eaub490

Opening up an MXD into the current ArcMap session using ArcPy?

Discussion created by eaub490 on Jan 12, 2011
Latest reply on Jun 10, 2014 by JScheirer-esristaff
I�??m converting  a mapping system into ArcPy.  I�??ve made great progress but hit a stumbling block!!!  I want my users to be able to pick, from a pick list, a pre-made mxd and load it into their current ArcMap session.  I�??ve created this simple toolbox but�?� could not find any ArcPy method for loading an mxd into the current session? 

I could load layer files instead but that would defeat my purpose since the mxds have several elements in the layout (header, footer, north arrow, tailored legend, etc.) that I want to preserve .  Since we can�??t create these elements in ArcPy, I am kind of stuck!  Using ArcObject to do such a simple task would be kind of ridiculous too.  Am I missing something here or was it an oversight in ArcPy?

I can open up an mxd into a �??separate�?� session though, but that�??s not want I�??m trying to achieve:
mxd = r"C:\Temp\eaub490\SUMA\Products\Timber Sales Map\Timber Sales Map.mxd"
os.startfile(mxd)

Any helps or comments would be greatly appreciated.

Eric

Outcomes