GetShapeId Method


Returns the id of the RebarShape element that defines the shape of the rebar.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 19.0.0.0 (19.0.0.405)
Since: 2009

Syntax

C#
public ElementId GetShapeId()
Visual Basic
Public Function GetShapeId As ElementId
Visual C++
public:
ElementId^ GetShapeId()

Remarks

A Free Form Rebar that has Workshop Instructions set to Bent is considered to have multiple shapes and this method will throw exception.

A Free Form Rebar that has Workshop Instructions set to Straight or a Shape Driven is considered to have only one shape and this method will return the id of that shape.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions InvalidOperationException This Rebar is matched with multiple shapes.

See Also