CreateFreeForm Method (Document, Guid, RebarBarType, Element)


Creates a free form rebar that can have constraints.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2018

Syntax

C#
public static Rebar CreateFreeForm(
	Document doc,
	Guid serverGUID,
	RebarBarType barType,
	Element host
)
Visual Basic
Public Shared Function CreateFreeForm ( _
	doc As Document, _
	serverGUID As Guid, _
	barType As RebarBarType, _
	host As Element _
) As Rebar
Visual C++
public:
static Rebar^ CreateFreeForm(
	Document^ doc, 
	Guid serverGUID, 
	RebarBarType^ barType, 
	Element^ host
)

Parameters

doc
Type: Autodesk.Revit.DBDocument
A Document.
serverGUID
Type: SystemGuid
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
Type: Autodesk.Revit.DB.StructureRebarBarType
A RebarBarType element that defines bar diameter, bend radius and material of the rebar.
host
Type: Autodesk.Revit.DBElement
The element to which the rebar belongs. The element must support rebar hosting.

Return Value

The newly created free form Rebar Instance.

Remarks

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.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException host is not a valid rebar host. -or- The server with serverGUID was not registered for RebarUpdateService.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also