This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IE > IEditor Interface > IEditor.Location Property (ArcObjects .NET 10.4 SDK) |
The last known location of the mouse.
[Visual Basic .NET] Public ReadOnly Property Location As IPoint
[C#] public IPoint Location {get;}
IEditor editor;
//get a reference to m_app(hook) in the ICommand::OnCreate method.
editor=m_app.FindExtensionByName("ESRI Object Editor")
IPoint point=new PointClass();
point=m_editor.Location;
System.Windows.Forms.MessageBox.Show(point.X.ToString("N2") + ", "
+ point.Y.ToString("N2"));
m_app was declared as a module level variable and set to hook in ICommand::OnCreate method.
This could be used in the ICommand::OnClick method.
Dim m_editor As IEditor
m_editor=m_app.FindExtensionByName("ESRI Object Editor")
Dim point As IPoint
point=m_editor.Location
' To use the messge box you need to add the System.Windows.Forms reference.
MessageBox.Show(point.X.ToString("N2") + ", " + point.Y.ToString("N2")
IEditor Interface | esriSketchConstraint Constants | ISketchTool Interface