我试图使用以下方法在平板中乘以钢筋:
(使用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)问题是我无法确定钢筋间距的方向。这取决于钢筋在我的板坯上的位置。下面是此代码如何创建钢筋的示例
任何帮助都将不胜感激。
谢谢
发布于 2018-12-04 08:38:03
只需添加一行: rebar.GetShapeDrivenAccessor().BarsOnNormalSide = True
https://stackoverflow.com/questions/52815889
复制相似问题