Hallo,
i have a problem with calculating a field with a string variable.
The string variable is the filename1. But the field description doesn´t take take the string value.
Thanks for your help.
PYTHON CODE:
fclist = gp.ListFeatureClasses("*", "Polygon")
for featureclass in fclist:
name = str(featureclass)
# setting filenames and pathvars
filename1 = os.path.splitext(featureclass)[0]
print filename1
pathvar1 = ReferenceWorkspace + "\\" + filename1
filename2 = OutputLocation + "\\" + filename1 + "_Dissolve"
# Dissolve selected attirbute field
gp.Dissolve_management (featureclass, filename2, DissolveField)
OutputLocation = gp.Workspace
# Add Field Description and calculate Description with file name
gp.AddField_management (filename2, "Description", "TEXT","","","30" )
gp.CalculateField_management (filename2, "Description", 'filename1', "Python","")