Get the index of the Layer in the parent page (0 offset).
Note: In version 7, the index was based on 1-offset.
In versions 7.5 and later, the index is based on 0-offset.
int GetIndex( )
Index of the layer in the parent page
//Get the index of the Layer in the active page(0 offset).
// Create a layer object and attach it to currently active layer
Layer ly = Project.ActiveLayer();
// If object is valid, get the index and report
if( ly.IsValid() )
printf( "Active layer has 0-offset index of %d in the page\n", ly.GetIndex() );