Skip to content

Instantly share code, notes, and snippets.

View tom-montgomery's full-sized avatar
🎯
Focusing

Thomas Montgomery tom-montgomery

🎯
Focusing
View GitHub Profile
@AlexArcPy
AlexArcPy / create_mxd_comtypes.py
Created November 5, 2017 09:08
Create a new empty ArcGIS map document (.mxd) with Python (comtypes)
from comtypes.client import GetModule, CreateObject
from snippets102 import GetStandaloneModules, InitStandalone
esriCarto = GetModule(r"C:\Program Files (x86)\ArcGIS\Desktop10.5\com\esriCarto.olb")
# First time through, need to import the “StandaloneModules”. Can comment out later.
GetStandaloneModules()
InitStandalone()
# Create a map document object