Get selection point via .NET?

Get selection point via .NET?

Sinc
Advisor Advisor
655 Views
3 Replies
Message 1 of 4

Get selection point via .NET?

Sinc
Advisor
Advisor
How do I get the selection point or pick point in the .NET API? That is, when the user picks an object, how do I get the coordinates that the cursor was at when the user selected the object?

I'm guessing it has something to do with the PickPointSelectedObject class, but I'm having difficulty figuring out how all this fits together with the Editor GetSelection method et al...
Sinc
0 Likes
656 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
You mean this?
PromptEntityResult res = ed.GetEntity("\nSelect Polyline: ");
Point3d pickPt = res.PickedPoint;

Or, if you mean to get the result ala the lisp function "ssnamex", I haven't
seen a way to do that...yet

"sinc" wrote in message news:5725332@discussion.autodesk.com...
How do I get the selection point or pick point in the .NET API? That is,
when the user picks an object, how do I get the coordinates that the cursor
was at when the user selected the object?

I'm guessing it has something to do with the PickPointSelectedObject class,
but I'm having difficulty figuring out how all this fits together with the
Editor GetSelection method et al...
0 Likes
Message 3 of 4

Anonymous
Not applicable
The equal to ssnamex is found in the SelectedObject item of the
SelectionSet.
From the SelectedObject you can get the ObjectID, SelectionMethod,
SelectionDetails.

HTH.

"Jeff Mishler" wrote in message
news:5725395@discussion.autodesk.com...
You mean this?
PromptEntityResult res = ed.GetEntity("\nSelect Polyline: ");
Point3d pickPt = res.PickedPoint;

Or, if you mean to get the result ala the lisp function "ssnamex", I haven't
seen a way to do that...yet

"sinc" wrote in message news:5725332@discussion.autodesk.com...
How do I get the selection point or pick point in the .NET API? That is,
when the user picks an object, how do I get the coordinates that the cursor
was at when the user selected the object?

I'm guessing it has something to do with the PickPointSelectedObject class,
but I'm having difficulty figuring out how all this fits together with the
Editor GetSelection method et al...
0 Likes
Message 4 of 4

Sinc
Advisor
Advisor
Ah, I was trying to use the ed.GetSelection() method and the PromptSelectionResult. There is no PickedPoint method with that.

I believe the PromptEntityResult will work. Thanks.
Sinc
0 Likes