BeforeIterate (macro)

Sets the active layer in the active window to 1.

Definition:

Def BeforeIterate {Layer -S 1};

Example:

This script counts the datasets in layer 1.

nlay1dats=0; 
BeforeIterate;
doc -e D {
      nlay1dats+=1;
};