Valued Contributor
Posts: 60
Registered: ‎06-18-2009
Message 1 of 2 (223 Views)

eInvalidInput on creating New Extents3D? bug?

223 Views, 1 Replies
05-18-2012 01:38 PM

I am trying to get true geometric extents of an object within a block reference. I use something along these lines:


Dim blk AsBlockReference= blkEnt


Dim minPoint AsPoint3d= ent.GeometricExtents.MinPoint.TransformBy(blk.BlockTransform)


Dim maxPoint AsPoint3d= ent.GeometricExtents.MaxPoint.TransformBy(blk.BlockTransform)


Return New Extents3d(minPoint, maxPoint)


This does work most of the time, but there are some blocks that return eInvalidInput right on the return line. I have verified and there are no issues with minPoint or MaxPoint, the "seem" fine. So then i explode the block and reblock it, and the problem goes away.


Now that's a pain to ask the user to do, obviously there's a bug somewhere, and reblocking the block fixes it, but I just don't understand why that's the problem. Because the points look fine.


So i copied what was in the maxpoint while it was causing an issue and after. Here's the result:




The bottom one is the one that would cause an issue. Now, its interesting that they are different, i reblocked it and placed it in the precisely the same spot.


Anyone see a problem here?


Valued Contributor
Posts: 60
Registered: ‎06-18-2009
Message 2 of 2 (221 Views)

Re: eInvalidInput on creating New Extents3D? bug?

05-18-2012 01:46 PM in reply to: ViktorCAD

Ah, sometimes you just have to type things out to get the ideas going, after reading my own post i realized that i hadn't checked if extents3d cares about the order that the values are being passed in. And decided to inspect both min and max points before and after reblocking and sure enough they are swapped, the block was probably mirrored? anyway, i see the problem now, hope this helps someone in the future.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!