Select to view content in your preferred language

Open MXD File

8036
15
Jump to solution
04-18-2016 07:53 AM
ChrisHolmes
Frequent Contributor

Hello everyone,

I am using this line of code to open up an mxd file:

os.startfile("c:/chris/{0}/{0} - existing_proposed.mxd".format(string))

It works and opens the file, but it opens in a new instance of ArcMap. Is there a way to have it open in the instance that is already open?

Thanks,

Chris

Tags (3)
0 Kudos
15 Replies
DanPatterson_Retired
MVP Emeritus

Luke  are you suggesting a different workflow might be in order?

0 Kudos
Luke_Pinner
MVP Regular Contributor

Possibly... ArcObjects is the only way to do what the OP wants and using COM via comtypes is the most used (by python people) way of accessing AO (there's also the .NET route using pythonnet). But it's a lot a stuff to install and configure...

DanPatterson_Retired
MVP Emeritus

I thought so... a need or a nice decision

0 Kudos
curtvprice
MVP Esteemed Contributor

But it's a lot a stuff to install and configure...

So much for "batteries included."  

0 Kudos
Luke_Pinner
MVP Regular Contributor

lpinner wrote:

But it's a lot a stuff to install and configure...

And then you have to deal with a python/ArcObjects frankenhybrid

0 Kudos
ChrisHolmes
Frequent Contributor

Thanks for the feedback everyone. Lots to learn!

Have a good day.

0 Kudos