What is the schema for your featureset input? It sounds like something might be wonky with that since you are getting data out the other end, just missing fields.1) Check schema of featureset input for tool.2) If this is correct, you might want to do some error checking in your tool itself before you output to feature class. Make sure all the fields are going into your featureclass->featureclass featureset = your featureset fields = arcpy.ListFields(featureset) for field in fields: arcpy.AddMessage(field.name) arcpy.CopyFeatures_management(featureset, outputFeatureclass)
featureset = your featureset fields = arcpy.ListFields(featureset) for field in fields: arcpy.AddMessage(field.name) arcpy.CopyFeatures_management(featureset, outputFeatureclass)
Heming,I have a script that does something similar, but rather than creating a feature class in the scratch.gdb, my script creates a new file geodatabase in the the scratch folder and uses feature class to feature class to populate features while applying a query. The geodatabase is then zipped so it can be downloaded by a user. You could try creating a new file GDB in the scratch folder and populate the feature class using Feature Class to Feature Class in the new GDB rather than using the sratch.gdb. Alternately, rather than populating with Feature Class to Feature Class. You could create a new empty feature class in the sratch.gdb using Create Feature Class, setting your input or feature set as the template feature class (so the schemas match) . You could then use the Append to add the feature set (or a feature layer to which you apply your query) to the newly created feature class. Not sure why what you are trying wouldn't work, but it my be worth trying a work around. Best of luck,BZ
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.