def initializeParameters(self): mxd = arcpy.mapping.MapDocument("CURRENT") featureLayerList = [] rasterLayerList = [] for lyr in arcpy.mapping.ListLayers(mxd): if lyr.isFeatureLayer == True: featureLayerList.append(lyr.name) elif lyr.isRasterLayer == True: rasterLayerList.append(lyr.name) self.params[1].filter.list = featureLayerList self.params[2].filter.list = rasterLayerList return
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.