PROCEDURE layerInfo; {© Petri Sakkinen 1995} { this puts layer info into a worksheet where it can be edited & with another macro 'executed'} VAR layerScale, layerCount, layerVis, objCount, counter, rowNo : INTEGER; layerName : STRING; theLayer, theWorksheet : HANDLE; BEGIN counter:=0; layerCount:=NUMLAYERS; theLayer:=FLAYER; theWorksheet:=GETOBJECT('Layer control'); DELOBJECT(theWorksheet); NAMEOBJECT('Layer control'); SPRDSHEET(0,0,layerCount+1,3); SPRDWIDTH(6); theWorksheet:=GETOBJECT('Layer control'); SELECTSS(theWorksheet); LOADCELL(1,1,'Layer name'); LOADCELL(1,2,'Scale'); LOADCELL(1,3,'Visibility'); LOADCELL(1,4,'Objects'); REPEAT rowNo:=counter+2; layerName:=GETLNAME(theLayer); layerScale:=GETLSCALE(theLayer); layerVis:=GETLVIS(theLayer); objCount:=GETNUMOBJS(theLayer); LOADCELL(rowNo,1,layerName); LOADCELL(rowNo,2,NUM2STR(1,layerScale)); LOADCELL(rowNo,3,NUM2STR(0,layerVis)); LOADCELL(rowNo,4,NUM2STR(0,objCount)); IF theLayer <> NIL THEN theLayer:=NEXTLAYER(theLayer); counter:=counter+1; UNTIL (counter=layerCount); END; RUN(layerInfo);