Project: HiCAD P+ID

Take Over Database Attributes as Dialogue Text

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).

.

Digits:

Number of digits for the output counting value.

Number:

0, if the counting value is to be determined, or the determined counting value.

Prefix:

Additional character string (can contain keywords and fixed text) for the formation of the character string to which the counter is to refer; it is added for this purpose to the character string at the start, preceding the keyword %COUNT.

Reference:

Character string (can contain keywords and fixed text) to which the counter is to refer; the instruction preceding %COUNT will not be used by the counter.

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.
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.

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.

 

Example:

%PARENT(%FRAME(%DMO(D1:%PARENT(%PIDAT(9))))) is a reasonable generation rule.


Edit symbol

P+ID > Symbol > Edit symbol

  1. Activate the function, and then activate the symbol from the loaded project.
  1. Right-click the corresponding input field to open a context menu. Select Dialogue type/Attribute.
  1. Select the desired attribute from the displayed list with a double-click (or mark it and confirm with OK).

The list shows the alias names of the database attributes assigned in the dialogue type and attribute definitions.

Dialogtyp

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.

Beispiel

 

Example of a generation rule containing keywords (and static text)
  1. Activate the function, and then activate the symbol from the loaded project.
  2. Right-click the corresponding input field (e.g. Comment1) to open a context menu. Select Dialogue type/Attribute.

Symbol editieren

You can now assign a dialogue type Icon, a HELiOS attribute Icon or a pipe class attribute Icon from the displayed list to the selected symbol.

Double-clicking a dialogue type Icon enters a generation rule, e.g. %PIDAT(4) into the Comment (1) input field.

Double-clicking an attribute Icon enters a generation rule, e.g. %DBAT(BENENNUNG) into the Comment (1) input field.

Double-clicking a pipe class attribute Icon 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.

 

Title block symbol Icon

Double-clicking Title block symbol Icon opens a new dialogue window:

Here you can only select the dialogue type Icon for the title block, e.g. %FRAME(%PIDAT(4)).

 

Superordinate symbol Icon

Double-clicking Superordinate symbolIcon opens a new dialogue window:

Here you can select a dialogue type Icon, a HELiOS attribute Icon or a pipe class attribute Icon from the Superordinate symbol.

Double-clicking a dialogue type Icon enters a generation rule, e.g. %PARENT(%PIDAT(4)) into the Comment (1) input field.

Double-clicking an attribute Icon enters a generation rule, e.g. %PARENT(%DBAT(BENENNUNG)) into the Comment (1) input field.

Double-clicking a pipe class attribute Icon enters a generation rule, e.g. %PARENT(%DBPCLAT(BENENNUNG)) into the Comment (1) input field.

 

Data Mask Object (DMO)

Double-clicking a Data mask object (DMO) opens a new dialogue window:

Here you can only select the dialogue type Icon for the DMO, e.g. %FRAME(%PIDAT(4)).

Double-clicking a dialogue type Icon 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.

 

Configurable counter

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.

e.g. %FIRST(%PIDAT(6):%PIDAT(3201):%PIDAT(3204))

e.g. %PREPOST(%PIDAT(6):%PIDAT(3201):%PIDAT(3207))

 

The generation expressions with counter (configurable counters) can also be used:


Edit mask

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-2019, ISD Software und Systeme GmbH
Version 2402 - HiCAD P+ID
Date: 06/10/2019

> Feedback on this topic