Deal All.
I need to get an idea how to write a scenario for ArcMAP. There is a external code which provides a numerical result for ArcMAP calculations. After finishing of this code ArcMAP need to be started to join this data to my shape file and convert and export it to KML. I tried to use ModelBuilder but it can be started only under ArcMap. The other way is to write Python script for starting Arcmap and doing my Model. Am I right or it is possible to start Model under Windows or Command line?
Hi Nick,
Yes you can call your model from command line.
# Import system modules
import sys, string, os, logging
WORK_FOLDER = "E:\\Workfolder"
# initiate logging
logging.basicConfig(filename=WORK_FOLDER+'Script.log',format='%(asctime)s %(message)s',level=logging.DEBUG)
# Set the License...
arcpy.SetProduct("ArcEditor")
logging.debug('product initialised')
# Load required toolboxes...
arcpy.AddToolbox("c:\program files\arcgis\desktop10.2\ArcToolbox\Toolboxes\Data Management Tools.tbx")
arcpy.AddToolbox("c:\program files\arcgis\desktop10.2\ArcToolbox\Toolboxes\Conversion Tools.tbx")
logging.debug('Loaded toolbox')
Now you can execute this script from command line or scheduled task by calling python.exe like below.
c:\python27\python.exe c:\gisWork\myscript.py
Hi Riyas!
Thank you for your help! I've got an idea!