Revit 2024 API |
Element..::..GetGeometryObjectFromReference Method |
Element Class See Also |
Retrieve one geometric primitive contained in the element given a reference.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:
2012
Syntax
C# |
---|
public GeometryObject GetGeometryObjectFromReference( Reference reference ) |
Visual Basic |
---|
Public Function GetGeometryObjectFromReference ( _ reference As Reference _ ) As GeometryObject |
Visual C++ |
---|
public: GeometryObject^ GetGeometryObjectFromReference( Reference^ reference ) |
Parameters
- reference
- Type: Autodesk.Revit.DB..::..Reference
The geometric object referenced by this instance will be retrieved from the model.
Return Value
The geometric object referenced by the input reference.
Remarks
It will return the last geometric object in the path.
nullNothingnullptra null reference (Nothing in Visual Basic) will be returned if related geometric object could not be found in the model.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The id of this element is not same as that referenced by reference |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions..::..InvalidOperationException | The element id held by the input reference is not same as the id of this element. The geometric information could not be taken for this element. |