I have the name of a layer (child of a switch-layer) but how do I find out it's id?
I can get the layer-id for a selected layer easy enough but how do I get it for other layers?
Would the easiest thing be to get the number of layers in the switch, then move between them and see if the current layer's name matches the one I'm looking for and when it does get the id of that layer and finally select the original layer again?
Or is there any function to get the id of a named layer?
It seems that the interface to get the layer's ID is not implemented for the layer it self. It is implemented for Group Layer class type only or for the MohoDoc class if you want to access a root layer.
So the only way is the one you suggested.
-G