How to validate a feature class name in a model?

المشرف العام

Administrator
طاقم الإدارة
I have a model which creates feature classes based on the value in an attribute (using Iterate Feature Selection). It works fine as long the field values don't have spaces, punctuation marks, etc. but fails otherwise.

I know in a script I can use arcpy.ValidateTableName() to convert "C:\Big Kalzas!" into a name that can be saved, "C__Big_Kalzas_". How does one do the same in a model?

I tried Calculate Value with an expression as simple as arcpy.ValidateTableName("%Field Name%") do defining and calling a function, but it keeps evaluating to 1.





أكثر...
 
أعلى