Author Topic: Return Location @ Selection  (Read 776 times)

0 Members and 1 Guest are viewing this topic.

quaziconscience

  • Swamp Rat
  • Posts: 753
  • .net stuff
Return Location @ Selection
« 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!

quaziconscience

  • Swamp Rat
  • Posts: 753
  • .net stuff
Re: Return Location @ Selection
« Reply #1 on: November 15, 2016, 12:05:21 AM »

MickD

  • Gator
  • Posts: 3242
  • !false...it's funny 'cause it's true!
Re: Return Location @ Selection
« Reply #2 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.
A programmer's wife tells him, "Run to the store and pick up a loaf of bread. If they have eggs, get a dozen."

The programmer comes home with 12 loaves of bread.

quaziconscience

  • Swamp Rat
  • Posts: 753
  • .net stuff
Re: Return Location @ Selection
« Reply #3 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!

MickD

  • Gator
  • Posts: 3242
  • !false...it's funny 'cause it's true!
Re: Return Location @ Selection
« Reply #4 on: November 15, 2016, 12:24:02 AM »
No worries :)
A programmer's wife tells him, "Run to the store and pick up a loaf of bread. If they have eggs, get a dozen."

The programmer comes home with 12 loaves of bread.

huiz

  • Swamp Rat
  • Posts: 829
  • Certified Prof C3D
Re: Return Location @ Selection
« Reply #5 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 :-)
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

quaziconscience

  • Swamp Rat
  • Posts: 753
  • .net stuff
Re: Return Location @ Selection
« Reply #6 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 :-)

:)

MWorland

  • Mosquito
  • Posts: 6
Re: Return Location @ Selection
« Reply #7 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