Identify view change in AutoCAD

<?xml encoding=”UTF-8″>By Virupaksha Aithal

I have received an query from an ADN partner recently on identifying the view change in AutoCAD, like when user pan or zoom using mouse.
To identify the view change developers can use the editor rector viewChanged() (AcEditorReactor:: viewChanged()) in ObjectARX . However, in AutoCAD.NET API, the equivalent API is provided in document class Document::ViewChanged

[CommandMethod("ViewChnage")]
public void ViewChnage()
{
Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
doc.ViewChanged += doc_ViewChanged;
}
void doc_ViewChanged(object sender, EventArgs e)
{
//
}

Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading