Solved! Go to Solution.
could [you] assist me constructing a python expression using calculate value to solve a similar problem. I've attached two print screens of my current model. I'm selecting CAD Features based on their layer name and then using Feature Class to Feature Class to write out the CAD Features to a File Geodatabase based on the Layer Name. The problem that I have is that I need to remove invalid characters from the Layers Name.
ValidateName(r"%Layer name%",r"%Output geodatabase%")
def ValidateName(fc,wks): import arcpy vName = arcpy.ValidateTableName(fc,wks) return vName
could [you] assist me constructing a python expression using calculate value to solve a similar problem. I've attached two print screens of my current model. I'm selecting CAD Features based on their layer name and then using Feature Class to Feature Class to write out the CAD Features to a File Geodatabase based on the Layer Name. The problem that I have is that I need to remove invalid characters from the Layers Name.
ValidateName(r"%Layer name%",r"%Output geodatabase%")
def ValidateName(fc,wks): import arcpy vName = arcpy.ValidateTableName(fc,wks) return vName