ToExtent.ToEntity Issues In Getting the Distance Between Faces

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am having trouble with the function in my title, namely ToExtent.Entity from an ExtrudeFeature. On the GUI side, I have created a sketch and extrusion, selected the type to be "To", and selected another FACE to essentially create a hole in my shape. I can verify by ExtrudeDefinition.ExtentType that I am dealing with a ToExtent object, as expected.
However, I am having issues getting the extrude distance from this. I am trying to the get the distance by getting a reference to the "To" face, by using the property ToExtent.ToEntity. I thought that this would get a reference to the Face which I selected during its creation, however this is not the case.
Does anyone know the issue? I can post code if required, however the issue seems to lie in:
Face oFace2 = oTo.ToEntity as Face;
Thanks,
Philip