Retrieve the ElementId corresponding to an external rebar shape parameter
in the document, if it exists; otherwise, add the parameter to the document
and generate a new ElementId.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.2.0.0 (26.2.0.0)
Syntax
C#
public static ElementId GetOrCreateElementIdForExternalDefinition( Document doc, ExternalDefinition externalDefinition )
Parameters
- doc Document
- A document.
- externalDefinition ExternalDefinition
- A shared parameter.
Return Value
ElementIdAn ElementId representing the shared parameter stored in the document.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | A non-optional argument was null. |