Skip to content

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

Public Class

Creates a free form rebar that can have constraints.

Namespace: Autodesk.Revit.DB.Structure

Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

Syntax

public static Rebar CreateFreeForm(
Document doc,
Guid serverGUID,
RebarBarType barType,
Element host
)

Parameters

doc Document

A Document.

serverGUIDGuid

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.

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 IRebarUpdateServer for more details.