Parse the string representation of the id into a corresponding ElementId.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static bool TryParse(
string idStr,
out ElementId id
)
Public Shared Function TryParse (
idStr As String,
<OutAttribute> ByRef id As ElementId
) As Boolean
public:
static bool TryParse(
String^ idStr,
[OutAttribute] ElementId^% id
)
static member TryParse :
idStr : string *
id : ElementId byref -> bool
Parameters
- idStr String
- The string representation of the id to return.
- id ElementId
- Out parameter set to the ElementId represented by the string.
Return Value
Booleantrue if the string was successfully parsed into an ElementId, false otherwise.
Remarks
If the string represents [!:Autodesk::Revit::DB::Element::InvalidElementId] the id
will contain it upon return. If the parse fails, the id will be undefined.
See Also