The Construct Syntax
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
REPORTING SYNTAX
You can create an array which includes a number of elements which all satisfy specific selection criteria, as defined by yourself. The syntax is:
!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:
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
Using the facilities described here you can create an expression and have it evaluated for all elements which satisfy particular selection criteria. The results of the expression are then placed in a named array.
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!
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!
As you can see, there are a lot of commands available to the PDMS user and the list above is only scratching the surface. Almost all of the command syntax is described in the reference manuals but in some cases you might find it difficult to compose the required command from these alone. In these cases, it might be necessary to build a command by using the query syntax itself, using $Q and $H syntax.
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:
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 $H
1
SETUP $H1
'FORM'
SETUP FORM $H
UNAME
And so on.
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 $H
1
SETUP $H1
'FORM'
SETUP FORM $H
UNAME
And so on.
0 comments :
Post a Comment