VBA GetBoundingBox doesn't work in autocad 2015 as in 2014.
For example -
1. extrude profile strait forward by some axis non complanar to any wcs axises
2. rotate solid to be complanar to some wcs axis
result - coordinates returned by GetBoundingBox are worng for wcs.
Still everything was fine in autocad 2014.
Anyone knows how can i fix it?
Thanks in advance!
Yes. I agree - that does not look good.
The sample solid I tried wasn't even close. And, as you've already pointed out, AutoCAD 2014 VBA handled the task well. 2015 is making me a little nervous.
Examine the attached drawing and compare the Bounding Boxes to what is returned by the GetBoundingBox Method. It appears that AutoCAD 2015 is storing the original bounding box displacements/vectors/points (Perhaps in one or more of the DXF group codes 1010, 1011, 1012, 1013), and those values update via any Transformation procedures. Even if the transformation happen programmatically.
The GetBoundingBox Method may then be reading those values. The result, unfortunately, returns the bounding box of the original bounding box.
A procedure may have to EXPLODE the transformed solid, and calculate the bounding box of all the explosion remnants.