GLOB_LAYER is a global variable and returns the number of the current layer, which is assigned to the SmartParts object.
Remarks
Usable since script version 1.1 (Allplan 2012-1).