Run the model outside of ArcMap or ArcCatalog
Geoprocessing tools cannot be directly run outside of the ArcMap or ArcCatalog context. In order to accomplish this, you must export your model as a python script. This requires a completed, properly functioning model.
- In the Model window, click Model > Export > To Python Script.
- Name and save the python script.
-
You must adjust that python script to include ArcFM licensing
information. Open an editor, such as Notepad++, and add the following
lines to the top of the script:
#ArcFM licensing
import win32com.client
app = win32com.client.Dispatch("Miner.Framework.Dispatch.MMAppInitializeDispatch")
runtime = win32com.client.Dispatch("Miner.Framework.Dispatch.MMRuntimeEnvironmentDispatch")
app.Initialize(0x5)
#end ArcFm licensing
- You can now run this script from outside of an ArcMap or ArcCatalog session. To automate the process of exporting this data, you might use the Microsoft Task Scheduler to create a task that runs nightly.