Rebar.CreateFromCurvesAndShape
Description:
Creates a new instance of a shape driven Rebar element within the project. The instance will have the default shape parameters from the RebarShape.
Creates a new instance of a shape driven Rebar element within the project. The instance will have the default shape parameters from the RebarShape.
Overloads (2):
CreateFromCurvesAndShape(Document,RebarShape,RebarBarType,RebarHookType,RebarHookType,Element,XYZ,IList[Curve],RebarHookOrientation,RebarHookOrientation)
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
)
-
docA document.
-
rebarShapeA RebarShape element that defines the shape of the rebar. A RebarShape element matches curves and hooks. A RebarShape element provides RebarStyle of the rebar.
-
barTypeA RebarBarType element that defines bar diameter, bend radius and material of the rebar.
-
startHookA RebarHookType element that defines the hook for the start of the bar. If this parameter is nulla null reference (Nothing in Visual Basic), it means to create a rebar with no hook.
-
endHookA RebarHookType element that defines the hook for the end of the bar. If this parameter is nulla null reference (Nothing in Visual Basic), it means to create a rebar with no hook.
-
hostThe element to which the rebar belongs. The element must support rebar hosting; RebarHostData.
-
normThe normal to the plane that the rebar curves lie on.
-
IList<Curve>curvesAn array of curves that define the shape of the rebar curves. They must belong to the plane defined by the normal and origin. Bends and hooks should not be included in the array of curves.
-
startHookOrientDefines the orientation of the hook plane at the start of the rebar with respect to the orientation of the first curve and the plane normal. Only two values are permitted: Value = Right: The hook is on your right as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." Value = Left: The hook is on your left as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up."
-
endHookOrientDefines the orientation of the hook plane at the end of the rebar with respect to the orientation of the last curve and the plane normal. Only two values are permitted: Value = Right: The hook is on your right as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up." Value = Left: The hook is on your left as you stand at the end of the bar, with the bar behind you, taking the bar's normal as "up."
Return Value
nullNothingnullptr
The newly created Rebar instance, or null Nothing nullptr a null reference ( Nothing in Visual Basic) if the operation fails.
-
The element host was not found in the given document. -or- host is not a valid rebar host. -or- The input curves is empty. -or- The input curves contains at least one curve which is not a bound Line or bound Arc and is not supported for this operation. -or- curves do not form a valid CurveLoop. -or- The input curves contains at least one helical curve and is not supported for this operation.
-
A non-optional argument was null
-
norm has zero length. -or- A value passed for an enumeration argument is not a member of that enumeration
-
curves contains non-fillet arcs with radii that are less than the minimum bend radius for the RebarBarType and RebarShape style.
-
rebarShape does not match curves.