If in a data mask of a P+ID symbol dialogue texts of the dialogue type Comment or User-defined contain a reference to a database attribute (of an assigned part, or a part to be assigned), the corresponding attribute contents will be taken over into the dialogue texts.
Let us assume that the content of the database attribute BENENNUNG (DESIGNATION) is to be taken over to the first Comment dialogue of a Vessel symbol. Then , the following dialogue text will be required there:
%DBAT(BENENNUNG)
BENENNUNG is the name of the attribute that is internally used by HELiOS (i.e. not the alias name from the dialogue type and attribute definitions of the HiCAD P+ID module).
The following dialogue texts are available:
Example1:
%% Valve: %DBAT(BENENNUNG) DN %PIDAT(…) returning the following after evaluation: Valve: Ball valve DN 100%% Valve: %DBAT(BENENNUNG) DN %PIDAT(…).
Example 2:
%DBAT(BENENNUNG) DN %PIDAT(431) returning the following after evaluation: Ball valve DN 100%DBAT(BENENNUNG) DN %PIDAT(431).
Example:
%DMO(D1:%PIDAT(5)) returning D1%DMO(D1:%PIDAT(5)) after evaluation.
Example 1:
%PIDAT(4)-%COUNT(2:0) returning B1-01%COUNT(2:1:%COUNTREFTEXT(B1-)) after evaluation.
Example 2:
%PIDAT(4)-%COUNT(2:0:%PIDAT(3)-) returning B1-01%PIDAT(4)-%COUNT(2:1:%PIDAT(3)-:%COUNTREFTEXT(Dortmund-B1-)) after evaluation.
Example 3:
%PIDAT(4)-%COUNT(%PARENT(%PIDAT(4)):2:0) returning E1-01%PIDAT(4)-%COUNT(%PARENT(%PIDAT(4)):2:1:%COUNTREFTEXT(B1)) after evaluation.
For every type of dialogue text output, only the text before the first % character will be considered. Each new evaluation will overwrite the text before the first % character.
After evaluation of the generation rule the attribute text saved in the data mask will consist of the text created by the generation rule, followed by the generation rule itself. generation rules may only be used for the dialogue type dialogue type Comment, or for user-defined dialogue types (Code 500 - 599).
.
|
Keywords |
|
||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
%DBAT(…) |
Supplies, for the current symbol or the symbol or for the symbol or object determined by a preceded keyword, the value of a database attribute from the article master of the assigned part. The name of a database part attribute must be enclosed in the brackets. Example: %DBAT(BENENNUNG) supplies, for the current symbol, the value of the database attribute BENENNUNG from the part master of the assigned part. |
||||||||
|
%DBPCLAT(…) |
Supplies, for the current pipeline symbol or the pipeline or object determined by a preceded keyword, the value of a database pipe class attribute from the data record of the assigned pipe class. The name of a database pipe class attribute must be enclosed in the brackets. Example: %DBPCL(BENENNUNG) supplies, for the current pipeline symbol, the value of the database pipe class attribute BENENNUNG from the data record of the assigned pipe class. |
||||||||
|
%FRAME(…) |
This keyword supplies, for the current symbol, data from the title block symbol. The string in the brackets must begin with a keyword and refers to the title block symbol of the current sheet. Example: % FRAME(%PIDAT(5)) supplies, for the current symbol, the dialogue text for the dialogue type with code 5 (Plant unit) from the title block symbol of the current sheet. |
||||||||
|
%PARENT(…) |
Supplies, for the current symbol, data from the superordinate symbol. The string in the brackets must begin with a keyword and refers to the superordinate symbol. Example: %PARENT(%PIDAT(4)) supplies, for the current symbol, the dialogue text for the dialogue type with code 4 (=Plant code) from the superordinate symbol. %PARENT(%DBAT(BENENNUNG)) supplies, for the current symbol, the value of the attribute BENENNUNG from the article master of the part assigned to the superordinate symbol. %PARENT(%DBPCLAT(BENENNUNG)) supplies, for the current symbol, the value of the database attribute BENENNUNG from the data record of the pipe class assigned to the superordinate symbol. |
||||||||
|
%PIDAT(…) |
Supplies, for the current symbol or the object determined by a preceded keyword, the dialogue text for the dialogue type. The number enclosed in brackets must be the code of a dialogue type. Example: %PIDAT(4) supplies, for the current symbol, the dialogue text for the dialogue type with code 4 (=Plant code). |
||||||||
|
%DMO(...) |
Supplies information on the DMO for the current symbol. The character string between the brackets consists of two components: Component 1 = The codes of the DMO, Component 2 = A different keyword relating to the DMO with codes in Component 1. The two components are separated by a colon. Examples: %DMO(D1:%PIDAT(9)) supplies, for the current symbol, the dialogue text for the dialogue type with code 9 (=Aggregate) of the DMO with code D1. |
||||||||
|
%COUNT(...) |
Supplies a counting value for the current symbol, referring to the evaluation of the characters within the instruction preceding this keyword. The character string between the brackets consists of several parameters. These separators are separated by colons. Syntax: %COUNT(Digits:Number) %COUNT(Digits:Number:Prefix) %COUNT(Ref:Digits:Number)
Examples: %PIDAT(5)-%PIDAT(9)-%COUNT(2:0) %PIDAT(5)-%PIDAT(9)-%COUNT(2:0:%PIDAT(1)-) %PIDAT(5)-%PIDAT(9)-%COUNT(XYZ-%PARENT(%PIDAT(4)):2:0)
|
||||||||
|
%COUNTREFTEXT(…) |
Shows, within a %COUNT keyword, the evaluation to which the counting value refers. This keyword will be automatically generated after evaluation of a %COUNT keyword, and represents the last parameter for %COUNT. A manual editing of the character string between the brackets is not recommended. This keyword must not be used independently on its own. Example: %PIDAT(5)-%PIDAT(9)-%COUNT(2:0)
%PIDAT(5)-%PIDAT(9)-%COUNT(2:0:%PIDAT(1)-)
%PIDAT(5)-%PIDAT(9)-%COUNT(XYZ-%PARENT(%PIDAT(4)):2:0)
|
||||||||
|
%XCODE(…) |
supplies for the active symbol a text portion of a dialogue text, with the dialogue text having the format XX0000. Example: %XCODE(%PIDAT(4)) supplies for the active symbol the text portion of the dialogue type 4 (Code). |
||||||||
|
%XDIGITS(…) |
supplies for the active symbol the number of digits of a dialogue text, with the dialogue text having the format XX0000. The character string between the brackets consists of two parts: Part 1 is a key word of the dialogue type, part 2 is a default value of the number of digits. If the number of digits is 0, the default value will be applied. The two parts are separated by a colon. Example: %XDIGITS(%PIDAT(4):3) |
||||||||
|
%ONCE(…) |
is evaluated once only when copying the attribute values of a Templates DMO to a symbol. This will only happen during symbol insertion. The text key expression within %ONCE will evaluated and its result will be returned as a simple character string. An empty %ONCE() text key works as if the attribute on which it is located was evaluated and had returned an empty result. This can be used to remove initialisations from library symbols. | ||||||||
|
%TSTR(…) |
is evaluated once only when copying the attribute values of a Templates DMO to a symbol. This will only happen during symbol insertion. The text key expression within %TSTR will be applied unchanged. Except for symbol insertions, the expression within %TSTR will be ignored. In this way you can prevent that expressions in Templates DMOs are already evaluated on the DMO sheet, which is, for instance, undesirable for counting. | ||||||||
|
%FIRST(…) |
contains as parameter a number of text key expressions which are separated from each other with colons. The result of %FIRST is the result of the first among the parameter text keys the result of which is not empty. Example: %FIRST(%PIDAT(1):%PIDAT(4):%PIDAT(16)) If %PIDAT(1) is not empty, %PIDAT(1) will be the result. Otherwise, %PIDAT(4) will be checked. If %PIDAT(4) is not empty, %PIDAT(4) will be the result; otherwise, %PIDAT(16) will be the result. |
||||||||
|
%PREPOST(…) |
contains a text key expression and, optionally, two more parameters. If the evaluation of the text key expression is not empty, the result will be preceded by the second parameter, and succeeded by the third parameter. Hence, this text key defines one prefix and one postfix. Example: %PREPOST(%PIDAT(4):-:#) If %PIDAT(4) leads to an empty result, the result of %PREPOST will also be empty. Otherwise, the result will be -%PIDAT(4)# |
||||||||
|
%% |
This character indicates the start of the generation rule, which may not only contain keywords, but also static texts). If the generation rule begins with a keyword, this character combination will not be necessary (as the keyword itself begins with a %). |
The following keywords are possible for the various symbol types:
|
%PCLDBAT(…) |
%DBAT(…) |
%PIDAT(…) |
%FRAME(…) |
%PARENT(…) |
%DMO (...) |
%COUNT
|
%COUNTREFTEXT |
Pipeline |
|
|
||||||
Pipe part |
||||||||
General type |
|
|||||||
Title block |
||||||||
Discontinuation symbol |
||||||||
Data mask object |
Matrix for nesting of various keywords:
%A\%B * |
%PCLDBAT(…) |
%DBAT(…) |
%PIDAT(…) |
%FRAME(…) |
%PARENT(…) |
%DMO (...) |
%COUNT
|
%COUNTREFTEXT |
%PCLDBAT |
/ |
|||||||
%DBAT |
/ |
|||||||
%PIDAT |
/ |
|||||||
%FRAME |
/ |
|||||||
%PARENT |
/ |
|||||||
%DMO |
/ |
|||||||
%COUNT |
/ |
|||||||
%COUNTREFTEXT |
/ |
*Keyword %A nests %B means: %A(…%B(…)…) is possible.
%PARENT(%FRAME(%DMO(D1:%PARENT(%PIDAT(9))))) is a reasonable generation rule.
Meaning of this generation rule: |
|
---|---|
%PARENT( |
Fetches the attribute from the superordinate symbol of the current symbol |
%FRAME( |
Fetches the attribute from the title block, where the superordinate symbol is located |
%DMO( |
Fetches the attribute from a data mask object in the current project |
D1 |
The data mask object has an identifier "D1" |
: |
Parameter separator |
%PARENT( |
Fetches the attribute from the superordinate DMO of the DMO with the identifier "D1" |
%PIDAT( |
The attribute of the superordinate DMO has a dialogue type |
9 |
The dialogue type is 9 (:=Aggregate) |
) |
Left parenthesis of %PIDAT |
) |
Left parenthesis of %PARENT |
) |
Left parenthesis of %DMO |
) |
Left parenthesis of %FRAME |
) |
Left parenthesis of %PARENT |
P+ID > Symbol > Edit symbol
The list shows the alias names of the database attributes assigned in the dialogue type and attribute definitions.
If a parts has been assigned to the symbol, the corresponding attribute value from the article master data of this part will be automatically taken over as dialogue text.
In the example below, the attribute value is the text Example vessel 2.
If there is a placeholder in the symbol graphic for the dialogue type to which the database reference belongs (as is the case here with the dialogue type "Comment"), the attribute value will be displayed automatically next to the symbol.
You can now assign a dialogue type , a HELiOS attribute or a pipe class attribute from the displayed list to the selected symbol.
Double-clicking a dialogue type enters a generation rule, e.g. %PIDAT(4) into the Comment (1) input field.
Double-clicking an attribute enters a generation rule, e.g. %DBAT(BENENNUNG) into the Comment (1) input field.
Double-clicking a pipe class attribute enters a generation rule, e.g. %DBPCLAT(BENENNUNG) into the Comment (1) input field.
After confirming, this generation printout will be automatically evaluated and drawn as a graphic if required.
Double-clicking Title block symbol opens a new dialogue window:
Here you can only select the dialogue type for the title block, e.g. %FRAME(%PIDAT(4)).
Double-clicking Superordinate symbol opens a new dialogue window:
Here you can select a dialogue type , a HELiOS attribute or a pipe class attribute from the Superordinate symbol.
Double-clicking a dialogue type enters a generation rule, e.g. %PARENT(%PIDAT(4)) into the Comment (1) input field.
Double-clicking an attribute enters a generation rule, e.g. %PARENT(%DBAT(BENENNUNG)) into the Comment (1) input field.
Double-clicking a pipe class attribute enters a generation rule, e.g. %PARENT(%DBPCLAT(BENENNUNG)) into the Comment (1) input field.
Double-clicking a Data mask object (DMO) opens a new dialogue window:
Here you can only select the dialogue type for the DMO, e.g. %FRAME(%PIDAT(4)).
Double-clicking a dialogue type enters a generation rule, e.g. %DMO(D1:%PIDAT(4)) into the Comment (1) input field.
After confirming, this generation printout will be automatically evaluated.
Please note:
The generation rules can also be used for the Edit several symbols; however, you need to enter the key manually here.
Double-clicking Configurable counter opens a new dialogue window:
Use the Assignment selection box to choose the reference for the counter. The contents dialogue window will change depending on your selection.
Reference text, Prefix, Number of digits: See syntax of %COUNT(…) above. In the context menu of Reference text or Prefix you will find the Dialog type/Attribute entry. If you select this option, the following dialogue window will be displayed:
Here you can insert a generation expression for the Prefixor Reference text of the counter. After confirming, the text will be entered in the text field. In the Number of digits field you can select a number from 1 to 9. Click Preview to display the counter in the read-only field. Click Help button to call the HiCAD Online Help.
After confirming with OK, the generation expression with counter, e.g. %COUNT(6:0:%DMO(D2:%PIDAT(4))) will be displayed in the input field of the dialogue window.
After another confirmation this generation expression with counter will be automatically evaluated further and, if required, drawn as a graphic.
With the option Generate via rule you can determine the number of digits of the text key %XDIGITS. After selecting this option, click the Generate button. In the context menu of the input field in the displayed dialogue window, you can then right-click, choose Dialogue type/Attribute and insert a desired Generation rule.
After confirming with OK, the rule will be displayed (e.g. %PIDAT(6)).
Further text keys can be called by double-clicking the Other key words icon in the Dialogue Type/Attribute dialogue window.
%XCODE, %XDIGITS |
After selecting the key word you can call the context menu function Dialogue type/Attribute in the displayed dialogue window. e.g. %XCODE(%PIDAT(6)) |
%TRIM, %ONCE, %TSTR |
After selecting the key word you can call the context menu function Dialogue type/Attribute in the displayed dialogue window. e.g. %TRIM(%PIDAT(3200)) |
%FIRST |
After selecting the key word you can call the context menu function Dialogue type/Attribute in the displayed dialogue window.
e.g. %FIRST(%PIDAT(6):%PIDAT(3201):%PIDAT(3204)) |
%PREPOST |
After selecting the key word you can call the context menu function Dialogue type/Attribute in the displayed dialogue window.
e.g. %PREPOST(%PIDAT(6):%PIDAT(3201):%PIDAT(3207)) |
%PCT |
Via this key the character % will be displayed after evaluation. |
%COLON |
Via this key the character : will be displayed after evaluation. |
%OPNPAR |
Via this key the character ( will be displayed after evaluation. |
%CLSPAR |
Via this key the character ) will be displayed after evaluation. |
The generation expressions with counter (configurable counters) can also be used:
P+ID symbol > Dialogue text > Edit mask
You can specify the assignment of a database attribute to a dialogue type in the data mask of a symbol already during its creation or its processing in the P+ID Symbol Editor. In this way you will achieve that the symbol, as soon as it has been inserted in the P+ID and has received a part assignment, will automatically adopt the attribute value that corresponds to the reference.
Enter the reference, as shown above, in the dialogue text column of the corresponding dialogue type. You can precede the reference with a text (here: DB attributes), which enables you to already see from the text placeholder in the symbol graphic that an attribute value is to be taken over there. During evaluation of the reference in the P+ID, this preceded text will be deleted.
Symbol (P+ID) • Management of Configurable, General Database Masks in Data Mask Objects (P+ID)
© Copyright 1994-2018, ISD Software und Systeme GmbH |