To place items on a workspace interactively:
Main Menu > New Workspace > kb-workspace > kb-workspace
KB Workspace menu that begins with the word New.
New Object menu choice.
g2-variable from the choose a class submenu.
logical-variable from the choose a class submenu.
To learn more about working with workspaces, see Chapter 4, Workspaces.
Using Item Menus
You perform an operation on an item interactively by selecting a choice from its menu.
To open an item's menu:
Click the mouse on the item.
![]() |
Click the mouse on the title bar of the menu.
Changing the Size of an Item
Selecting the change size menu choice opens a dialog that you use to change the size of this item's representation. G2 encloses the item in a rectangle with a thick border. To change the size of an item, move any edge or corner of the rectangle, then press the Update Now button.
![]() |
When you finish changing the size:
Cancel button to revert the item's representation to its previous size.
Yes button to retain the change you made.
change size option has no effect.
To clone an item interactively:
clone choice on its menu.
To clone an item programmatically:
Execute the create by cloning action.
create by cloning action always causes G2 to create a transient cloned item that does not reside upon any workspace. For the new item to become visible, your KB must also execute the transfer action, to place the new item upon a kb-workspace. You can also optionally execute actions that make the cloned item permanent. For more information about the
create by cloning action, see Creating an Item by Cloning Another.
Cloning Specific Knowledge
In most cases, a cloned item's knowledge includes all the knowledge of its source item, if it is valid for a new copy of that knowledge to exist in the current KB. For instance, a cloned item has the same attribute displays that are defined for its source item. However, an object that is cloned from another object that is the value of an attribute cannot also be the value of the same attribute. Names attribute. This reflects the philosophy that, in general, it is less desirable to have more than one item with the same name, especially among items of the same class. Names attribute displays that this item has no name.
![]() |
Changing the Color of an Item
The color menu choice allows you to assign color settings interactively to the color attributes of items. color menu choice depend on the item's representation style, as follows:
icon-color color attribute.
text-color, border-color, and background-color color attributes.
foreground-color and background-color color attributes.
The next figure shows how G2 displays the color palette after you select the
color menu choice:
![]() |
For example, the
color choice in the menu for a rule allows you to set the three color attributes for items with a text box representation style:
![]() |
Deleting an Item
The delete menu choice for an item causes G2 to remove that item from the current KB. Use this menu choice to delete an item, regardless of whether the KB is running, paused, or reset, and regardless of the settings of the item status. Delete Workspace choice on a workspace's menu to delete the workspace. Remember that deleting a workspace also deletes all items upon the workspace, as well as all items below those items in the KB's workspace hierarchy.
Describing an Item
The describe menu choice for an item directs G2 to display a Describe workspace, which presents information about an item's knowledge. The exact information that the workspace displays depends on the class of the selected item. Names attribute. If the selected item has no user-specified name, the Describe workspace displays the G2-assigned name for the item, as with this Describe workspace for an unnamed workspace:
![]() |
For items of certain classes, the Describe workspace offers much more information, as for this unnamed logical variable:
![]() |
The Describe workspace has its own menu. The text items that appear in a Describe workspace are also selectable and have their own menus.
Tip: See the various chapters in this document to obtain more information about what appears in the Describe workspace for items of a particular system-defined class.
Describing the Configuration of an Item
Selecting the describe configuration choice on an item's menu displays a table that shows the hierarchy of configurations that apply to the item. Configurations and the configurations hierarchy are described in Chapter 7, Configurations.
Lifting to the Top and Dropping to the Bottom
Use the Lift to Top and Drop to Bottom menu choices to change an item's layer position, adjusting its relative position, top to bottom, among the items in this workspace. Lift to Top causes the selected item to appear on top of any other item on its workspace. Selecting Drop to Bottom causes the selected item to appear beneath any other item on its workspace. Lift to Top and Drop to Bottom work by revising the layering of items on a workspace. Lift to Top makes the selected item's item layer position less than the item layer positions of all other items on that workspace. Conversely, Drop to Bottom makes the selected item's item layer position greater than the item layer positions of all other items on that workspace. Lift to Top and Drop to Bottom:
![]() |
Naming an Item
Select the name menu choice to edit the Names attribute of an item. Selecting name causes G2 to open a Text Editor workspace. When you finish editing the name, press Return, or click the mouse on the End button.
![]() |
After a name box appears, you can drag it to a new position near the item or anywhere else upon the workspace. You can quickly open the Text Editor and edit the item's name by clicking on the text of the name box.
To open the menu for a item's name box:
Click near the corner of the displayed item name.
To edit the name of an item shown in a name box:
Open the menu for the name box and select edit from the menu.
To hide the display of a name box:
Open the menu for the name box and select hide name from the menu.
Showing and Hiding an Item Name Box Programmatically
You can access and manipulate an item's name box programmatically using the attribute access facility. The name-box of an item is represented in a structure.
![]() |
structure( ) function.
name-box of the variable has no value.
name-box has its original values.
![]() |
This figure shows the effect of rotating an item with an icon representation:
![]() |
This figure shows the effect of reflecting an item with an icon representation:
![]() |
Displaying the Table for an Item
Selecting the table menu choice directs G2 to display the attribute table for this item.
Transferring Items to Another Workspace
Selecting the transfer menu choice allows you to use the mouse pointer to drag the selected item to any KB workspace that is displayed in the G2 window.
![]() |