|
||
Groups and Wildcards
|
|
||||||||||||||||||||||||||
Groups SilverScreen supports primitive groups and entity groups.
Primitive groups are defined by a P-GROUP BEGIN command, a list of primitives that are to be in the group, and a P-GROUP END command. Here is an example:
Q-groups are defined using a similar command sequence. The following defines a group of objects:
|
|
||||||||||||||||||||||||||
Wildcards Wildcards are one of the powerful tools available to the developer. Wildcard path names may be used to create Q-groups. They may also be used in commands. The wildcard characters are:
The “*” and “?” are used in the conventional manner. Here are several examples:
The “#” wildcard is used to identify, within a block, the entity with the highest numeric suffix for a given prefix. Suppose that the blocks \part1, \part5, and \part14 appeared in the root block. Then \part# would identify the block \part14.
The “#” wildcard is often used in combination with the creation of entities. If the root block contained the blocks previously mentioned, then the command shown below will create a block \part15. Once this block has been created, it can be referenced by the wildcard path \part#.
The “!” wildcard will locate entities at any level of the drawing hierarchy. !knob* will match any entity in the drawing that has the prefix knob. Here it does not matter whether the entity is located at the root or six levels deep in the hierarchy.
The “,” wildcard allows the union of wildcard paths. Suppose that we want to identify all entities in the drawing hierarchy that had either the prefix “knob” or the prefix “latch”. This can be done with the wildcard union !knob*,!latch*.
Wildcards can be used to define groups. They can also be used directly in commands. The following illustrates both of these uses:
|
|