我正在尝试使用以下方法在钢筋中增加钢筋:
(使用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)
问题是我无法定义钢筋间距的方向。这取决于我板中的钢筋位置。 Here is an example of how this code creates rebars
任何帮助将不胜感激。
谢谢
答案 0 :(得分:0)
只需添加一行: rebar.GetShapeDrivenAccessor()。BarsOnNormalSide = True