CreateFreeForm Method (Document, Guid, RebarBarType, Element)


Rebar Create Free Form(Document, Guid, Rebar Bar Type, Element) Method

Creates a free form rebar that can have constraints.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public static Rebar CreateFreeForm(
	Document doc,
	Guid serverGUID,
	RebarBarType barType,
	Element host
)

Parameters

doc Document
A Document.
serverGUID Guid
The API server GUID. Should be the same that the function GetServerId() from class derived from [!:Autodesk::Revit::DB::Structure::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.
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
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 [!:Autodesk::Revit::DB::Structure::IRebarUpdateServer] for more details.
See Also
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →