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
I'm not sure, but does IAppRot.Add do what you want? Otherwise you could probably just start a new arcmap.exe process by calling Proces.Start("c:\path\to\arcmap.exe") and then get a reference to the new instance using IAppRot. Or save a new mxd and open that: Proces.Start("c:\path\to\mymxd.mxd")