I'd like to be able to select an object (PromptSelection), and remember at what coordinate I grabbed it.
by coordinate, I dont min grip point. But any point on the object/line/poly/etc.
usually this is broken into
promptSelection
promptPoint
but I'd like to use only "prompt selection" with background mechanics getting the point etc.
is there a simple solution?
cus attm, all I can come up is
using PointMonitor eventH, with a filter that would tell me when (and where) i selected the object to "grab" that point.
If you use GetEntity instead of GetSelection then you can use the PickedPoint property of the result.
[CommandMethod("GetViewportPropertiesCSharp"] public void GetViewportPropertiesCSharpCommand() { var promptEntityOptions = new PromptEntityOptions("Select a viewport to view properties."); promptEntityOptions.SetRejectMessage("\nThat is not an viewport!"); promptEntityOptions.AddAllowedClass(typeof(Viewport), true); var promptEntityResult = Active.Editor.GetEntity(promptEntityOptions); if (promptEntityResult.Status != PromptStatus.OK) { return; } using (var transaction = Active.Database.TransactionManager.StartTransaction()) { var viewPort = promptEntityResult.ObjectId.OpenAs<Viewport>(); Active.WriteMessage($"\nBackClip On : {viewPort.BackClipOn}"); Active.WriteMessage($"\nThe back clip distance is {viewPort.BackClipDistance}"); Active.WriteMessage($"\nFrontClip On : {viewPort.FrontClipOn}"); Active.WriteMessage($"\nThe front clip distance is {viewPort.FrontClipDistance}"); Active.WriteMessage($"\nPicked Point : {promptEntityResult.PickedPoint.ToString()}"); transaction.Commit(); } } }
thank you! really swift reply!
1 question if you dont mind answering.
I wonder, at what point of the learning curve do you learn such details?
and how do you find out about them? Is it experience thing, or I missed some .doc 😉
p.s. Im newb