Hello,
Had a parameter that can be a feature class or a raster. If it is a raster I would like it to be vectorized. Is there a way to get that information from the parameter and then just do a simple if statement to send it to be vectorized or to move on if it already is?
habitat = arcpy.Parameter(
name='Habitat',
displayName='Habitat Raster',
datatype=['GPRasterLayer', 'GPFeatureLayer'],
direction='Input',
parameterType='Required')
Solved! Go to Solution.
Should have looked a little longer:
desc = arcpy.da.Describe(FC or Raster)
if desc['dataType'] == 'RasterDataset':
...
elif desc['dataType'] == 'FeatureClass':
...
Should have looked a little longer:
desc = arcpy.da.Describe(FC or Raster)
if desc['dataType'] == 'RasterDataset':
...
elif desc['dataType'] == 'FeatureClass':
...