I used the information to write and test code. The searched layers were written in a text file. I noticed that not all layers were searched. Am I doing something wrong?
PROCEDURE SelectThem(oLayer :HANDLE);
hLayer := GetParent(oLayer);
WHILE hLayer <> NIL DO BEGIN
tempLayerName := GetLName(hLayer);
hLayer := NextLayer( hLayer );