Describe the bug
iModel.Elements.getElementProps throws 'Element not found' regardless of the cause of the error.
To Reproduce
const regionId = "0x000001" // a valid id for a region element in the iModel
const badId = {id: regionId} as unknown as Id64String;
const element = iModel.elements.getElementProps<SectionDrawingLocationProps>({ id: badId, wantGeometry: true });
other variations throw the same error:
//const spatialRegion = iModel.elements.getElementProps<SectionDrawingLocationProps>({ id: badId , wantGeometry: true });
//const spatialRegion = iModel.elements.getElementProps<SectionDrawingLocationProps>(badId );
//const spatialRegion = iModel.elements.tryGetElementProps(badId );
//const spatialRegion = iModel.elements.tryGetElement(badId );
Expected behavior
Throw a more meaningful error.
Describe the bug
iModel.Elements.getElementProps throws 'Element not found' regardless of the cause of the error.
To Reproduce
other variations throw the same error:
Expected behavior
Throw a more meaningful error.