POST
|
Ohh, sorry Dan. automate is the toolbox and Model() is the model name. I am going off of what ESRI has on their site. Schedule a model—ArcGIS Pro | ArcGIS Desktop import arcpy
arcpy.ImportToolbox(r"C:\path\myToolbox.tbx", "tbxAlias")
arcpy.myModel_tbxAlias(r"c:\pathToInput\inputFolder", r"C:\pathToGdb\output.gdb")
... View more
08-21-2019
02:34 PM
|
0
|
1
|
1048
|
POST
|
Thanks for the response Dan, where do I find the documentation? Sorry I'm kind of a newbie.
... View more
08-21-2019
01:56 PM
|
0
|
3
|
1048
|
POST
|
Hello everyone, I am trying to automate a model I have built in Arcpro. I have looked at other posts with similar issues, but can't seem to fix it or figure out what I'm doing wrong. Please help The model takes a CSV, creates points (customers) then draws a line from point to point according to the matching xy in each customer. It also creates another point file with another CSV file. Heres what it looks like: Using online resouces I created a script to automate the running of this model because it needs to be updated every day, however I get an error that the model has no atribute. I have tried calling it as "arcpy.automate.Model_() and without the underscore as well ("_") I am using spyder IDLE to run the code, it doesnt seem to work in the ArcPro python window either. Heres the code: import arcpy
arcpy.env.workspace=("C://Users/Planner1/Documents/ArcGIS/Projects/Automate_links_round2/Automate_links_round2.gdb")
arcpy.env.overwriteOutput = False
print ('Script started')
# import the toolbox
arcpy.ImportToolbox(r"C:/Users/Planner1/Documents/ArcGIS/Projects/Automate_links_round2/Automate.tbx")
print ('Toolbox imported')
#import the model
arcpy.automate.Model()
print ('Model imported')
print ('Script finished') And here is the metadata for the tool: Error: runfile('C:/Users/Planner1/Documents/KML_Codes/Schedule Model builder.py', wdir='C:/Users/Planner1/Documents/KML_Codes')
Script started
Toolbox imported
Traceback (most recent call last):
File "<ipython-input-6-a3a2d3d140f5>", line 1, in <module>
runfile('C:/Users/Planner1/Documents/KML_Codes/Schedule Model builder.py', wdir='C:/Users/Planner1/Documents/KML_Codes')
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Planner1/Documents/KML_Codes/Schedule Model builder.py", line 19, in <module>
arcpy.Model()
AttributeError: module 'arcpy' has no attribute 'Model' Please let me know if I need to add any more info to help answer this question. Thanks for the help,
... View more
08-21-2019
12:06 PM
|
0
|
5
|
1603
|
Online Status |
Offline
|
Date Last Visited |
06-15-2021
10:38 PM
|