BrokenLegMike

How to Set Feature Class/Layer Parameter Type

Discussion created by BrokenLegMike on Mar 19, 2013
Latest reply on Mar 19, 2013 by BrokenLegMike
I'm not sure if it's really possible, but I'm trying to set a couple parameters in my ArcToolbox GUI. I know a few of the ArcGIS default tools do this, so I'm thinking I can. What I want for a parameter is for it to be able to be a cross between the 'Layer' parameter type where is has a drop down with a list of the layers in the map, but if the map doesn't contain any layers, then I want the folder icon so the user navigate to a feature class and choose that instead.

The problem with the 'Layer' parameter, is that when you use the folder icon to search, it only accepts layer files. The problem I have with the feature class parameter type is that it won't accept layers in the map if any exist (i.e. there is now drop down to choose a layer)

A really good example of this would be the 'Intersect' tool. The first parameter has a drop down that will populate a list of layers in the map which you can choose from. There is also the folder icon beside that parameter and wheny ou open, the 'Show of Type' allows Layers or feature classes. This is what i am looking for.

I've gone through the list of available parameters in ArcGIS 10.1 and it doesn't appear to be anything that does this unless I'm missing something?

Thanks,
Mike

Outcomes