Hi, what's the best way to obtain the layer ID of an ILayer?
The information below might be confusing, but I just want to provide background as to why I'm asking this question...
The closest thing I found was ILayerDescriptor.ID . But it seems you need a Map Service object to obtain the ILayerDescriptor--all I have is an mxd document.
I guess I could loop through all layers, and just increment an integer starting from 0, and assume that the layer ID will be the same as the integer. But that seems kinda quirky.
The information below might be confusing, but I just want to provide background as to why I'm asking this question...
The closest thing I found was ILayerDescriptor.ID . But it seems you need a Map Service object to obtain the ILayerDescriptor--all I have is an mxd document.
I guess I could loop through all layers, and just increment an integer starting from 0, and assume that the layer ID will be the same as the integer. But that seems kinda quirky.