Hi,
Can I get the Point3D of wherever I click in the model just like the measure tool? I just know I can get the screen coordinate X and Y.
Thanks!
Anna
Solved! Go to Solution.
Solved by xiaodong_liang. Go to Solution.
Hi,
so, as said in the other post, the new plugin InputPlugin or ToolPlugin allows you to get the picked point:
public override bool MouseDown( //the current view when mouse down View view, //Enumerates key modifiers used in input: //None, Ctrl,Alt,Shift KeyModifiers modifiers, //left mouse button:1, //middle mouse button:2, //right mouse button:3 ushort button, //screen coordinate x int x, //screen coordinate y int y, // not clear to me :-( double timeOffset) { // key modifiers used in input Debug.Print(modifiers.ToString()); //left/middle mouse Debug.Print(button.ToString()); //timeOffset Debug.Print(timeOffset.ToString()); // get info of selecting PickItemResult itemResult = view.PickItemFromPoint(x, y); if (itemResult != null) { //selected point in WCS string oStr = string.Format( "{0},{1},{2}", itemResult.Point.X, itemResult.Point.Y, itemResult.Point.Z); Debug.Print(oStr); //selected object ModelItem modelItem = itemResult.ModelItem; System.Windows.Forms.MessageBox.Show ( modelItem.ClassDisplayName); } return false; }
Xiaodong ,
Is it only available in 2014?
How about in API viewcontrol? Is it possible to get mouse click XYZ point too?
Dear Xiaodong,
Is it still not possible to get the XYZ with application in .NET?
Best Regards,
John
Hi Xiaodong,
It is sad to heard that.
Anyway, thanks for your update.
Best Regards,
John