I made a model that creates a feature class, adds some fields and then enables editor tracking. I can get it to work in the ModelBuilder window but not by double clicking/opening it from the toolbox. The error I get is 000110: <target feature class> does not exist. The first two parts work just fine, it creates a feature class and adds the fields, but it comes up with that error when I include "enable editor tracking" in the model. I modified it to use the first part as a tool to chain the second part to, but I get the same error message. Please see pictures of my model for details.
I found a similar problem here: ArcGIS ModelBuilder model works in Edit windows but not from the "open" window - do you have any experience or advice? -… but the solution did not work for me.
Any help would be appreciated. Thank you.
I fixed my own problem by converting the model to python and adding in a line that refreshes the catalog. Code and line that fixed it in bold near bottom. I set one parameter to name: 'Select Geodatabase' type: 'workspace'. I also made sure the output feature class was using the selected geodatabse with the feature class name I wanted to use.
# Import arcpy moduleimport arcpy
# Script argumentsSelect_Geodatabase = arcpy.GetParameterAsText(0)
# Local variables:Feature_Class_Name = "Geofeatures_points_SCL"Geometry_Type = "POINT"Coordinate_System = "PROJCS['NAD_1983_UTM_Zone_11N',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-117.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]];-5120900 -9998100 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision"Output_Feature_Class = Select_Geodatabase + "\" + Feature_Class_NameOutput_Feature_Class__2_ = Output_Feature_ClassOutput_Feature_Class__3_ = Output_Feature_Class__2_Output_Feature_Class__4_ = Output_Feature_Class__3_Geofeatures_points_SCL = Output_Feature_Class__4_
# Process: Create Feature Classarcpy.CreateFeatureclass_management(Select_Geodatabase, Feature_Class_Name, Geometry_Type, "", "DISABLED", "DISABLED", Coordinate_System, "", "0", "0", "0")
# Process: Add Field: TYPEarcpy.AddField_management(Output_Feature_Class, "TYPE", "TEXT", "", "", "50", "", "NULLABLE", "NON_REQUIRED", "")
# Process: Add Field: LABELarcpy.AddField_management(Output_Feature_Class__2_, "LABEL", "TEXT", "", "", "50", "", "NULLABLE", "NON_REQUIRED", "")
# Process: Add Field: COMMENTSarcpy.AddField_management(Output_Feature_Class__3_, "COMMENTS", "TEXT", "", "", "100", "", "NULLABLE", "NON_REQUIRED", "")
arcpy.RefreshCatalog(Select_Geodatabase)
# Process: Enable Editor Trackingarcpy.EnableEditorTracking_management(Output_Feature_Class__4_, "", "DATE_CREATED", "", "", "ADD_FIELDS", "DATABASE_TIME")
I get the same error no matter what geodatabase I select.
could you change the geodatabase and retry?
I tried that and it did not work. Thank you for the suggestion. I get two errors:
Moved. Thank you, this was my first time posting in a long time and I had trouble finding the most appropriate place to post to.
Yes, I am putting in the parameter of what Geodatabase to save the new feature class to. When I run just the part that makes the new feature class and adds some fields (original post picture ModelBuilder1.png) it runs successfully. I can select a geodatabase and it creates the table with the new fields. It seems like the added tool to enable editor tracking doesn't see that the table was successfully created. Is there some kind of a forced refresh I could add to the model?
Could you move your question to https://community.esri.com/groups/model-builder to get better answers.
Try to make your Feature Class Name As Model Parameter.
when you double-click on the model in the toolbox, are you putting in parameters in there?
It is the phrase ... Editor tracking applies to operations on existing datasets only. It does not apply to operations that create new datasets. ...
from
http://pro.arcgis.com/en/pro-app/tool-reference/data-management/enable-editor-tracking.htm
that has me wondering if any featureclass created can't be found
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.