Hi,
I am trying to create a python toolbox in arcgis pro to convert polygon to raster. The polygon is supplied as feature layer in the parameters, and I used both arcpy.GetParameterAsText(1) and arcpy.GetParameter(1) to call this polygon to execute the conversion, but it is not working. I get an error - Polygon doesn't exist or is not supported. Could anyone provide a solution to it?
Thanks in advance.
You have double quotes around your first parameeter "Polygon", it shouldn't them since you want to refer to the variable not a text string.
Other points. You should allow the user to specify the 'output' workspace or filename (another parameter) rather than hardcoding it.
Also it is usually preferable to use *.tif files as an output, but the user may want another form. As it stands it will become a gdb raster
glad it worked out
It worked. Thanks, Dan.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.