创建钢筋是revit的一个重要的功能,其主要是revit结构钢筋功能的部分,如下图所示:
钢筋具有2中形式,一种是以自由钢筋生成,另外一种是钢筋区域生成钢筋区域。
1、自由钢筋Rebar
1.1 创建自由钢筋CreateFreeForm
通过钢筋服务创建自由钢筋
标签:Element,钢筋,XYZ,Revit,static,二次开发,Document,public From: https://www.cnblogs.com/minhost/p/16637098.htmlpublic static Rebar CreateFreeForm( Document doc, //当前的文档对象 Guid serverGUID, //IRebarUpdateServer 服务对象 RebarBarType barType, //当前的钢筋类型 Element host //钢筋属于的主体元素,这个元素必须是可以附加钢筋的元素 )
通过线条列表创建自由钢筋
public static Rebar CreateFreeForm( Document doc, RebarBarType barType, Element host, IList<CurveLoop> curves, out RebarFreeFormValidationResult error )
public static Rebar CreateFreeForm( Document doc, RebarBarType barType, Element host, IList<IList<Curve>> curves, out RebarFreeFormValidationResult error )
public static Rebar CreateFromCurves( Document doc, RebarStyle style, RebarBarType barType, RebarHookType startHook, RebarHookType endHook, Element host, XYZ norm, IList<Curve> curves, RebarHookOrientation startHookOrient, RebarHookOrientation endHookOrient, bool useExistingShapeIfPossible, bool createNewShape )
public static Rebar CreateFromCurvesAndShape( Document doc, RebarShape rebarShape, RebarBarType barType, RebarHookType startHook, RebarHookType endHook, Element host, XYZ norm, IList<Curve> curves, RebarHookOrientation startHookOrient, RebarHookOrientation endHookOrient )
public static Rebar CreateFromRebarShape( Document doc, RebarShape rebarShape, RebarBarType barType, Element host, XYZ origin, XYZ xVec, XYZ yVec )
2钢筋区域
public static AreaReinforcement Create( Document document, Element hostElement, XYZ majorDirection, ElementId areaReinforcementTypeId, ElementId rebarBarTypeId, ElementId rebarHookTypeId )
public static AreaReinforcement Create( Document document, Element hostElement, IList<Curve> curveArray, XYZ majorDirection, ElementId areaReinforcementTypeId, ElementId rebarBarTypeId, ElementId rebarHookTypeId )