Rebar.CreateFromRebarShape
Description:
Creates a new shape driven Rebar, as an instance of a RebarShape. The instance will have the default shape parameters from the RebarShape, and its location is based on the bounding box of the shape in the shape definition.
Creates a new shape driven Rebar, as an instance of a RebarShape. The instance will have the default shape parameters from the RebarShape, and its location is based on the bounding box of the shape in the shape definition.
public static Rebar CreateFromRebarShape(
Document doc,
RebarShape rebarShape,
RebarBarType barType,
Element host,
XYZ origin,
XYZ xVec,
XYZ yVec
)
-
docA document.
-
rebarShapeA RebarShape element that defines the shape of the rebar.
-
barTypeA RebarBarType element that defines bar diameter, bend radius and material of the rebar.
-
hostThe element to which the rebar belongs. The element must support rebar hosting; RebarHostData.
-
originThe lower-left corner of the shape's bounding box will be placed at this point in the project.
-
xVecThe x-axis in the shape definition will be mapped to this direction in the project.
-
yVecThe y-axis in the shape definition will be mapped to this direction in the project.
-
The element host was not found in the given document. -or- host is not a valid rebar host.
-
A non-optional argument was null
-
xVec has zero length. -or- yVec has zero length.