The construct syntax is described more fully in the Design reference manual and it is worth looking at it in more detail. CONST allows distances and angles to be calculated from the design data and is invaluable when you are writing applications. For example
- Q CONST ANGLE N AND W --->>>> gives 90°
- CONST A PIN1 TO PIN2 TO PIN3
- Q CONST DIST FROM P1 to P2 TO P2 OF/BOX1 --->>>> gives a distance
- CONST DIST FROM PA TO PL OF PREV
- $S QA=Q ATT --->>>> Create a synonym to query attributes
- Q EVAR PDMSUSER --->>>> Query the operating system location of user file directory PDMSUSER
You can create an array which includes a number of elements which all satisfy specific selection criteria, as defined by yourself. The syntax is:
VAR !Array COLLECT selection criteria
!Array is the name of the array that will be created to contain the elements selected.
The following general criteria can be used to define the selection:
- A class of elements or element types
- A logical expression to be satisfied at all selected elements
- A physical volume in whichall selected elements must lie
- A point in the hierarchy below which all selected elements must lie
Eg VAR !PIPECOMPS COLLECT ALL BRANCH MEMBERS
This would create the array !PIPECOMPS and set it to contain the reference numbers of every
piping component in the MDB. Logical expressions use the WITH and WHERE option; a volume is defined by the WITHIN keyword; and the hierarchy criteria is defined by the FOR keyword.
Eg VAR !ELBO COLL ALL ELBO WITH SPREF EQ /A300B/100
Evaluating Selected DB Elements
The command syntax is:
VAR !Array EVALUATE (Expression) FOR Select
!Array is the name of the array that will be created
(expression) is the expression that will be carried out for all elements that match the select criteria
Select is the selection criteria
Eg VAR !BOXES EVALUATE ( XLEN * YLEN ) FOR ALL BOXES
IF ALL ELSE FAILS!
The command: $Q gives a list of all possible commands at any one time. On it's own, $Q gives a complete list of top level commands in any PDMS module. When applied in the middle of a command line, it lists the options available at that point.
E.G. the command:
- SETUP FORM --->>>> Yields an error incomplete command line
- SETUP FORM $Q --->>>> list_name as required
- SETUP FORM _FRED $Q --->>>> lists a number of options including:
- 'BLOCK/ING' 'RESI/ZABLE' 'AT' 'SIZE' 'COPY' and Newline
Each of the words in quotes can be used at this point. There may be further options after these words and the same technique can be used to find the way through. The characters before the '/' indicate the minimum abbreviation which may be used for each part of the command. The presence of the Newline keyword without the quotes indicates that the return key may be pressed at this point and the command is executed.
Another form of syntax querying is the $H command. $H is a slightly more sophisticated form
of $Q, which lists the available options numerically as the following example shows:
SETUP FORM $H
And so on.