Return structural section from element.
Namespace: Autodesk.Revit.DB.Structure.StructuralSectionsAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2015
Syntax
C# |
---|
public static StructuralSection GetStructuralSection( Document document, ElementId elementId ) |
Visual Basic |
---|
Public Shared Function GetStructuralSection ( _ document As Document, _ elementId As ElementId _ ) As StructuralSection |
Visual C++ |
---|
public: static StructuralSection^ GetStructuralSection( Document^ document, ElementId^ elementId ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The document that owns the family for beam, brace or structural column.
- elementId
- Type: Autodesk.Revit.DB..::..ElementId
ID of family symbol or family instance for beam, brace or structural column.
Return Value
Structural section returned if element have one. For elements that do not have structural section or can not have structural section nullNothingnullptra null reference (Nothing in Visual Basic) will be returned.
Remarks
Only beams, braces and structural columns can have structural section associated with it.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |