Parse Method


Parse the string representation of the id into a corresponding ElementId.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2023

Syntax

C#
public static ElementId Parse(
	string idStr
)
Visual Basic
Public Shared Function Parse ( _
	idStr As String _
) As ElementId
Visual C++
public:
static ElementId^ Parse(
	String^ idStr
)

Parameters

idStr
Type: SystemString
The string representation of the id to return.

Return Value

ElementId string represented.

Remarks

If the string represents [!:Autodesk::Revit::DB::Element::InvalidElementId] it will be returned.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsInvalidOperationException Thrown when the string cannot be parsed into an ElementId.

See Also