AnsweredAssumed Answered

Newly created Data Frame will not allow user to show Properties dialog in ArcMap

Question asked by earnshaw on Nov 5, 2014
Latest reply on Oct 5, 2018 by drewdowling

I have code that creates new Data Frames, using IMaps.Create() and when you right click->Properties on the new Data Frames in ArcMap TOC, it never opens up the Properties window?!  Anyone know whats going on here, have I missed something in the code?


The code is fairly basic:


internal static void AddNewMap(string mapName)


     //Makes the new map the active focus map too.

     IMxDocument mxd = ArcMap.Document;


     IMaps maps = mxd.Maps;

     IMap map = null;


     if (maps.Count == 1 && maps.Item[0].Name != "Foo Name")


          map = maps.Item[0];




          map = maps.Create();



     map.Name = mapName;


     IActiveView pActiveView = ArcMap.Document.ActiveView;

     if (pActiveView is IPageLayout)

          ArcMap.Document.ActiveView.FocusMap = map;


          ArcMap.Document.ActiveView = (IActiveView)map;