The CMASK command lets you setup the color mask for the subsequent object selection via a GUI dialog manner. It will open a dialog window containing 16 check-boxes for the 16 pen colors. You may place a check-mark on a pen color to specify that the objects with the corresponding pen color will be allowed to select during the object selection operation when the selection masking is enabled. See SELECT command for details about the object selection operation.
The color mask is controlled by the system variable COLORMASK, which is an integer bit-flag variable with volatile attribute and will be reset to 0 each time TwinCAD
is initialized. The 16 color numbers corresponds to the 16 bits of the integer from bit 0 (LSB) to bit 15 (MSB). If a bit is set to 1, the entity with the corresponding color will be rejected by the object selection operation, provided that the selection mask is enabled. Color of [ByLayer] and [ByBlock] are resolved to the actual color used for the entity before the masking.