Files
speckle-sharp-connectors/Connectors/Revit/Speckle.Connectors.RevitShared/ElementIdHelper.cs
T
Jedd Morgan e0f26d2816 More warnings (#41)
* 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>
2024-07-22 17:15:04 +01:00

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);
}
}