RebarCreateFreeForm(Document, Guid, RebarBarType, Element) Method |
Creates a free form rebar that can have constraints.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static Rebar CreateFreeForm(
Document doc,
Guid serverGUID,
RebarBarType barType,
Element host
)
Public Shared Function CreateFreeForm (
doc As Document,
serverGUID As Guid,
barType As RebarBarType,
host As Element
) As Rebar
public:
static Rebar^ CreateFreeForm(
Document^ doc,
Guid serverGUID,
RebarBarType^ barType,
Element^ host
)
static member CreateFreeForm :
doc : Document *
serverGUID : Guid *
barType : RebarBarType *
host : Element -> Rebar
Parameters
- doc Document
-
A Document.
- serverGUID Guid
-
The API server GUID.
Should be the same that the function GetServerId() from class derived from IRebarUpdateServer returns.
This server has the responsibility to calculate the bars of Rebar.
- barType RebarBarType
-
A RebarBarType element that defines bar diameter, bend radius and material of the rebar.
- host Element
-
The element to which the rebar belongs. The element must support rebar hosting.
Return Value
Rebar
The newly created free form Rebar Instance.
ExceptionsException | Condition |
---|
ArgumentException |
host is not a valid rebar host.
-or-
The server with serverGUID was not registered for RebarUpdateService.
|
ArgumentNullException |
A non-optional argument was null
|
Remarks
For this type of Free Form Rebar, the layout can be changed. The server identified by serverGUID will have the responsibility to create the curves for the specified layout.
It requires a server GUID which will have the responsibility to define bar handles(which will be constrained) and to do the calculation of the curves.
See
IRebarUpdateServer for more details.
See Also