Python Create Sub Layers (Nested Layers)


I am able to create a layer in python, but have had no luck with a creating a sub layer / nested layer structure.

I want to create layer A, then create layer B as a child of A.

Here is code that hasn't worked:

import MaxPlus, pymxs
from pymxs import runtime as rt

parent = MaxPlus.LayerManager.CreateLayer("A")
MaxPlus.LayerManager.AddLayer(parent )

child = MaxPlus.LayerManager.CreateLayer("B")