span8
span4
span8
span4
Hello,
I would like to run simple maintenance arcpy scripts on feature classes after a load.Without reading those feature classes.
Example of scripts: attribute index,spatial index,extent calculation:
arcpy.AddIndex_management(in_table="C:/Users/xxx/Documents/ArcGIS/Default.gdb/tablename",fields="Name",index_name="name_1",unique="NON_UNIQUE",ascending="NON_ASCENDING")
arcpy.RecalculateFeatureClassExtent_management(in_features="C:/Users/xxx/Documents/ArcGIS/Default.gdb/tablename")
For both file geodatabase feature classes and Enterprise Geodatabase.
How do I achieve this with either a shutdown python script or PythonCaller / Creator?
Thanks
Take a look at this article:https://knowledge.亚搏在线safe.com/articles/47216/using-arcpy-for-fme-feature-processing.html
I guess you will need to change your Python interpreter to the one that has the arcpy module
Hi@oscard
Thanks a lot,I was able to make it work.Is there any way I can be switching to the custom interpreter with a script or some command before running the translation and then set it back to default after the translation?
Thanks,
How did you change the Python interpreter in your workspace?If you used the workspace'sPython Compatibilityparameter (eg.set to Esri ArcGIS Desktop Python 2.7),no further action should be required as changes to this parameter only applies to the current workspace.
Edit: This applies to FME 2017 and 2018 only
How can I use arcpy.Dissolve_management inside PythonCaller?6 Answers
PythonCaller ArcPy clip_analysis inputs2 Answers
Creating an ESRI Feature Layer using Python1 Answer
Using PythonCaller to Grant Privileges in Enterprise Geodatabase (SQL)5 Answers
how to calculate spherical area in km2 using python caller0 Answers
© 2019 亚搏在线Safe Software Inc |法律