TheSwamp

Code Red => .NET => Topic started by: nobody on November 14, 2016, 11:39:13 PM

Title: Return Location @ Selection
Post by: nobody on November 14, 2016, 11:39:13 PM
Is there a way to get the coordinate when/where I select an object?  I am using PromptNestedEntityOptions to select my object, but would like to grab the coordinate where I select the object at the same time.

Thanks!
Title: Re: Return Location @ Selection
Post by: nobody on November 15, 2016, 12:05:21 AM
Think I found my solution here:
https://www.theswamp.org/index.php?topic=36472.msg414679#msg414679
:)
Title: Re: Return Location @ Selection
Post by: MickD on November 15, 2016, 12:10:31 AM
I'm assuming you are catching your prompt result in the PromptNestedEntityResult class and if so you can use the PickedPoint property that this class inherits from PromptEntityResult.
Title: Re: Return Location @ Selection
Post by: nobody on November 15, 2016, 12:19:05 AM
I hate how hard I make things. I actually created a pointmonitor and did some shady stuff to capture the value lol.   Thanks so much!
Title: Re: Return Location @ Selection
Post by: MickD on November 15, 2016, 12:24:02 AM
No worries :)
Title: Re: Return Location @ Selection
Post by: huiz on November 15, 2016, 07:15:04 AM
I hate how hard I make things. I actually created a pointmonitor and did some shady stuff to capture the value lol.   Thanks so much!

On the other side you might have learned new things now, so no wasted time :-)
Title: Re: Return Location @ Selection
Post by: nobody on November 15, 2016, 09:42:42 AM
I hate how hard I make things. I actually created a pointmonitor and did some shady stuff to capture the value lol.   Thanks so much!

On the other side you might have learned new things now, so no wasted time :-)

:)
Title: Re: Return Location @ Selection
Post by: MWorland on April 04, 2019, 09:38:00 PM
When using promptNestedEntityResult.PickedPoint, I'm not receiving a point that is on the entity I select. For example, if you select an entity from a top view, your Z axis will be 0, not at the elevation of the entity selected.
This gets worse when you select an entity when you are not in an orthogonal view. AutoCAD seems to continue looking for the point until it hits elevation zero
Pick a point a the top in image 01
Point looks ok in Image 02
Point not ok in Image 03

Is there a way to prevent AutoCAD from picking a point past my actual entity?

Thanks,
matt