Parse Method


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

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.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: System String
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

Exception Condition
Autodesk.Revit.Exceptions InvalidOperationException Thrown when the string cannot be parsed into an ElementId.

See Also