public static SetParaInt ( Autodesk.Revit.DB.Element elem, BuiltInParameter paraIndex, int value ) : bool | ||
elem | Autodesk.Revit.DB.Element | given element |
paraIndex | BuiltInParameter | BuiltInParameter |
value | int | |
리턴 | bool |
/// <summary> /// set the parameters to given AreaReinforcement /// </summary> /// <param name="areaRein"></param> public virtual void FillIn(AreaReinforcement areaRein) { int temp = (int)m_layoutRule; bool flag = ParameterUtil.SetParaInt(areaRein, BuiltInParameter.REBAR_SYSTEM_LAYOUT_RULE, temp); //if BuiltInParameter doesn't work if (!flag) { Parameter paraLayout = ParameterUtil.FindParaByName( areaRein.Parameters, "Layout Rule"); if (null != paraLayout) { paraLayout.Set(temp); } } ChangeAreaReinCurves(areaRein); }
/// <summary> /// On the interior 4 curves, set the override flag /// and flip the hooks on the top 2 layers to "up" /// </summary> /// <param name="areaRein"></param> private void ChangeAreaReinCurves(AreaReinforcement areaRein) { //interior 4 curves are listed in the back of the curves, //this order is decided when we create it for (int i = 4; i < 8; i++) { AreaReinforcementCurve areaReinCurve = areaRein.Curves.get_Item(i) as AreaReinforcementCurve; //remove hooks, set the hook the top 2 layers to 'up' ParameterUtil.SetParaInt(areaReinCurve, BuiltInParameter.REBAR_SYSTEM_OVERRIDE, -1); ParameterUtil.SetParaInt(areaReinCurve, BuiltInParameter.REBAR_SYSTEM_HOOK_ORIENT_TOP_DIR_1, (int)HookOrientation.Up); ParameterUtil.SetParaInt(areaReinCurve, BuiltInParameter.REBAR_SYSTEM_HOOK_ORIENT_TOP_DIR_2, (int)HookOrientation.Up); } }