To delete a transient or a permanent item:
delete item {without permanence checks} {removing connection stubs}
without permanence checks clause.
To delete permanent items without permanent checks, optionally removing connection stubs:
delete item without permanence checks {removing connection stubs}
delete action in this way lets you delete permanent items programmatically, completely ignoring all transient restrictions. Deleting items by using the without permanence checks is the programmatic equivalent of the interactive delete menu choice.
without permanence checks statement requires that items be made transient prior to deletion. For a discussion about making items transient, see Making Permanent Items Transient.
When the
delete action executes, any rule that is waiting for a value and that refers to a deleted item (or to one of its attributes, its subworkspace, or to any item on its subworkspace) is cancelled. If a delete action is part of a rule, the rule is not cancelled, but any parallel or subsequent sequential action in the rule that refers to the deleted item causes G2 to signal an error. Removing Stubs While Deleting an Item
You can remove connection stubs from a remaining item when deleting an item to which another is connected.
To remove stubs when deleting an item connected to another:
delete filling-auto-1 removing connection stubs
C1 and C2, and the result of deleting C1 with the delete action using the removing connection stubs expression:
![]() |
Deleting Connections
To delete a connection:
delete {connection [without permanence checks]
[removing connection stubs] }
without permanence checks grammar. Deleting a connection does not delete the stubs, unless you use the removing connection stubs statement with the delete action, as in the next example.
![]() |