Tag Info

Hot answers tagged

3

The easiest way to loop through layers in ArcMap is to use IEnumLayer. You get a reference to that from IMap.Layers. http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//001200000482000000 Then check the type and cast each raster layer returned by the enumerator to IRasterLayer. ...


1

Further to Dan's answer on enumerating layers... with the UID.Value of IRasterLayer (see example UIDs here) supplied to the get_layers function you don't need to check later that it is a raster layer you're playing with, however sometimes you need to use the UID for IDataLayer which will return feature layers and raster layers, so to check this use: if ...



Only top voted, non community-wiki answers of a minimum length are eligible