e0f26d2816
* More warnings * Code warnings fixes and setup * more warning fixes * Fixed all warnings * format * Fixed new warnings * registration --------- Co-authored-by: Adam Hathcock <adam@speckle.systems>
18 lines
372 B
C#
18 lines
372 B
C#
using Autodesk.Revit.DB;
|
|
using Speckle.Converters.Common;
|
|
|
|
namespace Speckle.Connectors.RevitShared;
|
|
|
|
public static class ElementIdHelper
|
|
{
|
|
public static ElementId Parse(string idStr)
|
|
{
|
|
if (!int.TryParse(idStr, out var result))
|
|
{
|
|
throw new SpeckleConversionException($"Cannot parse ElementId: {idStr}");
|
|
}
|
|
|
|
return new ElementId(result);
|
|
}
|
|
}
|