Sub-definitions may be needed to create more complicated definitions. Sub-definitions are created by placing an operation on a line by itself, and then using the FIND operator on the following line. Each line in a sub-definition works similarly to the definition itself. The FIND operator selects a group of elements. For each of the following lines, up to the end of the sub-definition, FIND operates on the previous result to create a new group of elements. Mark the end of a sub-definition with the END FIND option, which appears on the continuation operator list.
The end of a sub-definition results in a group of elements that meet the sub-definition criteria. This sub-definition group is then applied to the search criteria of any previous FIND criteria to produce the completed set of elements. Definitions can be nested indefinitely and can be nested multiple times. The following example definition contains one sub-definition:
FIND Volume 123 N, 444 E, 377 El - 400 N, 550 E, 500 El |
KEEP ONLY Display Set Firewater |
THROW AWAY Data Diameter > 12 |
ADD |
FIND Volume 375 N, 600 E, 377 El - 500 N, 700 E, 500 El |
KEEP ONLY Level 7, 8, 9, 31 |
THROW AWAY File steel.dgn |
THROW AWAY Color 3 |
END FIND |
ADD Picked Objects |
Lines 1 through 3 define the group of elements in the specified volume that belong to the Firewater display set and are <= 12 inches in diameter.
Line 4 adds the sub-definition to the group.
Line 5 begins the sub-definition by selecting a volume to start with.
Lines 6, 7, and 8 keep only the elements on certain levels and then throw away anything left that is in file steel.dgn with color number 3. The END FIND operator on line 9 ends the sub-definition. The group that results from this sub-definition is then added to the results from line 3 to yield a new group. The last line adds some selected elements to the group to yield a final set of elements.