bpool

Adding a new Map to Maps collection

Discussion created by bpool on Nov 30, 2011
I am trying to add a second map to my maps collection in Arcmap. 
the following code works, but the new map that is added is corrupt. It will not display the map properties form, nor can I remove the map from the TOC, or use the map in layout mode. 
I can add and remove layers.

I have tried adding the map using other approaches and continue to get the same result. 

Public Sub AddMap()
        Dim DocMap As IMap = New Map
        My.Document.Maps.Add(DocMap)

        My.Document.UpdateContents()
End Sub

Thanks in advance for any pointers.

Bob

Outcomes