Converting feature set into feature class or layer

03-12-2012 11:41 AM
New Contributor
Hi All,

I am making a script tool in which I want to convert a parameter whose data type is feature set, to a feature class. I used these three lines in the code but I am getting an error saying that the object was not created.

input = sys.argv[1] # Input from the script tool
obj = arcpy.CreateObject(featureset, input) # Creating a feature set object"C:\Users\rbhosle\Desktop\Project_540\Interagency_Compliance\output.shp") #saving the feature set in a shapefile format

Could somebody tell me where I am going wrong?

0 Kudos
1 Reply
Regular Contributor II
Is your input variable holding something apprporiate to CreateObject?
Have you tried using arcpy.FeatureSet(input)
arcpy.FeatureSet() followed by ~.load(input) and then

It would be a good idea to make the save path a raw string:"C:\Users\rbhosle\Desktop\Project_540\Interagency_Compliance\output.shp")
otherwise single backslashes are interpreted as escapes.
0 Kudos