MohoDoc:LayerByAbsoluteID(id)

Version added: before 9.5

Arguments:

Name Type Description Default Ver
id int32 < 9.5

Return value:

Each layer in a scene has an unique absolute ID, starting with 0.
Child layers' IDs are followed immediately by their parents. Siblings are numerated from the bottom to top.

Moho does not currently provide a count of ALL layers in a document.
To iterate over all layers, start at layer 0 and continue until moho does not return a layer.
See this code snippet
<< Back to MohoDoc