RebarShapeParameters.GetElementIdForExternalDefinition
Description:
Retrieve the ElementId corresponding to an external rebar shape parameter in the document, if it exists; otherwise, return InvalidElementId.
Retrieve the ElementId corresponding to an external rebar shape parameter in the document, if it exists; otherwise, return InvalidElementId.
Remarks:
Before a parameter can be used in a RebarShapeDefinition, it must exist in the definition's document. There are two ways to achieve this. It can be bound to one or more categories in the document using the Document.ParameterBindings property, or it can be created by calling RebarShapeParameters.GetOrCreateElementIdForExternalDefinition().
Before a parameter can be used in a RebarShapeDefinition, it must exist in the definition's document. There are two ways to achieve this. It can be bound to one or more categories in the document using the Document.ParameterBindings property, or it can be created by calling RebarShapeParameters.GetOrCreateElementIdForExternalDefinition().
public static ElementId GetElementIdForExternalDefinition(
Document doc,
ExternalDefinition externalDefinition
)
-
docA document.
-
externalDefinitionA shared parameter.
Return Value
ElementId
An ElementId representing the shared parameter stored in the document,
or InvalidElementId if the parameter is not stored in the document.
-
A non-optional argument was.