Revit API:钢筋间距方向 (Python)



我正在尝试使用以下方法在平板中乘以钢筋:

(使用Python脚本(

doc = DocumentManager.Instance.CurrentDBDocument
RS = Autodesk.Revit.DB.Structure
RebarType = MyRebarType
slab = MySlab
norm = XYZ(0,0,1)
bar = MyCurve
n = MyQuantity
s2 = RebarSpacing
hook_type = None
rebar = RS.Rebar.CreateFromCurves(doc,RS.RebarStyle.Standard,RebarType,hook_type,hook_type,slab,norm,bar,RS.RebarHookOrientation.Right,RS.RebarHookOrientation.Left,True,True)
rebar.get_Parameter(BuiltInParameter.REBAR_ELEM_LAYOUT_RULE).Set(3)
rebar.get_Parameter(BuiltInParameter.REBAR_ELEM_QUANTITY_OF_BARS).Set(n)
rebar.get_Parameter(BuiltInParameter.REBAR_ELEM_BAR_SPACING).Set(s2)

问题是我无法定义钢筋间距的方向。这取决于钢筋在我的板中的位置。 下面是此代码如何创建钢筋的示例

任何帮助将不胜感激。

谢谢

只需要添加一行: 钢筋。GetShapeDrivenAccessor((.柱线正常侧 = 真

最新更新