The location of a workspace within a G2 window is part of its knowledge.
Layering Items Upon the Same Workspace
Item layering refers to how G2 draws the representations of items in a top-to-bottom manner upon a workspace. The layering of an item is part of its knowledge.
Note: G2 includes two drawing modes, Paint and XOR. The XOR drawing mode is a superseded capability. Your KB should use only the Paint drawing mode, described in Drawing Parameters. For further information, see Appendix F, Superseded Practices.
When Paint drawing mode is in effect and the representations of two items intersect, G2 displays those items so that they overlap. Each item's item layer position determines which item appears on top. Each item upon a workspace has a unique item layer position, which is an integer value of zero or higher that G2 sets and maintains. An item whose item layer position is zero appears on top of all other items upon that workspace.
OVERLAPPING-ITEMS workspace, the messages report the item layer positions of the other four items on the workspace. The item layer positions correspond to the overlapping appearances of the items' representations on the workspace.
![]() |
In general, when you add or transfer an item to a workspace, that item appears on top of all other items already on that workspace. The first item placed upon a new workspace has an item layer position of zero. This is true whether you create the item on that workspace or transfer the item from another workspace. As the set of items on a workspace changes, G2 automatically adjusts the item layer position values of the items that remain in the workspace.
Note: Other entities displayed on a workspace, such as its name box or an attribute table, also have their own item layer positions. For this reason, at any one point in time, the item layer positions of the items on your workspace might not include the value zero or be consecutive.
Your application should not rely on the absolute value of any item's item layer position. Rather, your application should rely on the relative differences among the layer positions of items. Distinguishing Permanent and Current Knowledge
After you reset the current KB, G2 contains only one version of each item's knowledge, called its permanent knowledge. An item's permanent knowledge is the set of attribute values, status values, and superior/subordinate relationships that are in effect when the current KB is reset.
conclude action to update the value of an attribute
make permanent action to update an item's permanent knowledge from its current knowledge
To demonstrate how an item's permanent and current knowledge differ:
Main Menu > New Workspace
KB Workspace > New Button > action-button
table from its menu.
my-action-button.
Action attribute of the button to:
change the name of my-action-button to the symbol your-action-button
![]() |
Main Menu > Start
Names attribute in the table and adds a note to the action button indicating that the item my-action-button does not exist.
Executing this action updates the button's current knowledge, but not its permanent knowledge. By pressing the button, you invoke an action, which performs a programmatic change to the item's knowledge.
Main Menu > Reset
Names attribute in the table and to remove the note about the item not existing. It now shows the value my-action-button, which represents the most recent change made to the button's permanent knowledge.