I updated to the new version of ArcGIS Pro 1.1.0 and the export script is gone. Is there a way to get it back?
The ability to export from ModelBuilder to a Python script was removed from ArcGIS Pro 1.1 because it did not match user expectations to provide a one-to-one export of your model to Python. The scripts generated by exported models were missing nested sub-models, and did not include iterators, feedback loops, and in-line variable substitution. Models with these components would require major changes that most people who use Export are not able to make themselves. There is currently no plan to add this capability back into ArcGIS Pro.
ModelBuilder export to Python was often used by those who wanted to learn the Python syntax for a geoprocessing tool, or who wanted a Python script that could execute their existing workflow of geoprocessing tools. Others wanted a Python script so the workflow could be run through Windows Task Scheduler. You can use these alternatives to accomplish these goals:
I'm trying this method but I keep getting the following error:
"SyntaxError: invalid or missing encoding declaration"
when it gets to the 2nd line to actually run my model.
In ArcGIS Pro you can copy the Python syntax for any geoprocessing tool you have run. Go to Project>Geoprocessing History, right-click any tool, and select Copy Python Command to copy the exact Python syntax needed to run the geoprocessing tool with the same parameter settings previously used.
In version 2.2 if I open the History tab in Catalog, it's always empty.
If I go to the Analysis ribbon and clieck History, it just exposes the same empty history tab in Catalog.
Is there some other History feature tucked away that I am not seeing?
Thinking that perhaps the History feature itself is broken I tried running a "buffer" operation and indeed it did work.
Is there some way to make a model generate history?
I found an option to put history into an XML file under %APPDATA%. It seemed to create a folder but puts nothing in it. I found option to put into metadata, I can't see that it works.
Retrieving data ...