| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (9 out of 30)

create

This action creates a transient connection or item. You can create an item by:

Whenever you create a transient item, it exists within the KB, but does not appear on a workspace until you use the transfer action to place it on a workspace. The item remains transient until or unless you make it permanent with the make permanent action. Transient items are deleted by G2 when the KB is reset. For a description of transient and permanent items, see Understanding the Knowledge Contained in Items.

Creating Transient Connections

Creating transient connections is described in Creating Transient Connections.

Creating an Item of a Particular Class

To create an item of a particular class:

This action creates an instance of the class-name you specify. You can optionally follow the class name with a local name in the statement. An example is:


Creating an Item by Cloning Another

To create an item by cloning an existing item:

This create action clones an existing item to create a new one. This action is similar to the clone menu choice, described in Cloning an Item, except that using the menu choice creates a permanent item, while using the create action creates a transient one. Cloning an item also clones its subworkspace and all items and their attributes on the subworkspace, but does not clone any relations. An example of creating by cloning is:


Creating an Item of a Class Using an Indirect Reference

To create an item whose class is determined from an expression:

Use this create statement in generic procedures whose arguments include a symbolic-expression that names a class, such as the example that follows in which the symbol X evaluates to a class name.


| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (9 out of 30)

Copyright © 1997 Gensym Corporation, Inc.