RVTDocs.com

Rebar.CreateFreeForm(Document, Guid, RebarBarType, Element)

Method
Description:
Creates a free form rebar that can have constraints.
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.
Syntax
public static Rebar CreateFreeForm(
	Document doc,
	Guid serverGUID,
	RebarBarType barType,
	Element host
)
Parameters
Parameter Type Description
doc Document A Document.
serverGUID Guid The API server GUID. Should be the same that the function GetServerId() from class derived from <a href="3e845cad-eca0-ccb3-785b-48a32a9f2677.htm">IRebarUpdateServer</a> 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
Type Description
Rebar The newly created free form Rebar Instance.
Exceptions
Exception 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