- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When using the Solid3d.GetSection method with a plane that doesn't intersect the solid or only intersects the solid at a point or line, I get a Region object that throws System.AccessViolationException on most of its properties. The documentation says I should get null.
Anyone else getting this? Is there a way of testing the Region object that doesn't throw the exception (which needs extra measures to catch because it is a Corrupted State Exception)? The Region.IsNull property also throws the exception, so no go there...
Meanwhile, I have worked around this by offsetting the plane slightly into the solid and checking the bounds of the solid before trying the method. These countermeasures break however if the solid has gaps, is small, doesn't line up with the coordinate system, etc...
Forgot to mention: I am using AutoCAD 2016
Solved! Go to Solution.