olwyn

Open new ArcMap instance from ArcMap addin form

Discussion created by olwyn on Aug 11, 2011
Latest reply on Aug 12, 2011 by olwyn
Hi there,
I'm trying to create a new ArcMap instance (ie. open a map in a separate ArcMap window) once a user clicks a button on an addin form.

I can get the map to open - but it's in the same ArcMap window (see code below).
        Dim mApp As ESRI.ArcGIS.Framework.IApplication
        Dim mDoc As ESRI.ArcGIS.Framework.IDocument
        mDoc = My.ArcMap.Application.Document
        mApp = mDoc.Parent
        mApp.Visible = True
        mApp.NewDocument(False, <file>)


How do I get the map to open in a new ArcMap window? I'm using ArcMap 10 and Visual Basic Express .NET 2008 SP1.
Cheers,
Olwyn

Outcomes