Monday 27 April 2015

arcobjects - How to change the view from layout view to data view using c# code in ArcMap?



How to change the view from layout view to data view using c# code?




Answer



You should use the IMxDocument.ActiveView Property.


You can use something like this:


IMxDocument mxDoc=(IMxDocument)m_app.Document;
mxDoc.ActiveView = mxDoc.FocusMap ; //if you want to cast to the focused map

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...