Skip to main content
Skip table of contents

Retrieve information for the drawing from Flow

General

In Vertex G4, you can add so-called text macros to drawings that retrieve information from either the general variables of Vertex G4, the databases of Vertex G4, or Flow.

  • Text macros are used, among other things, in drawing title blocks, where information is retrieved from the Vertex G4 archive or Flow.

Information related to the drawing can be retrieved from Flow to Vertex G4’s drawing regarding the item, project, subproject, product, or customer.

Text Macro in Vertex G4

In Vertex G4, it is possible to add a so-called hidden code to text.

The hidden code acts as a text macro that is activated, for example, by pressing the F5 function key. The hidden code begins and ends with the # symbol. The hidden code refers to definitions in the Alias file and uses the definition found there. If the definition is not found, the program prompts the user: "What should replace xxx?" (Where xxx is the hidden code field #xxx#).

The #PROJ_DESCR# in the adjacent image refers to the line in the Alias file:

CODE
# alias PROJ_DESCR PDMPROJECT.DESCR

where
PDMPROJECT refers to the Project object related to the Flow drawing, and
DESCR refers to the identifier of the name field of the project object (in the DESCR field).

Alias File
The software vendor's alias file is located in the folder ..\\vxg4(_srv)\\system\\texts.
The user-modified alias file is located in the folder ..\\vxg4(_srv)\\custom\\texts.

..\vxg4\system\ and ..\vxg4\shared\ and ..\vxg4\custom\ = Vertex G4 is installed locally.

..\vxg4_srv\system\ and ..\vxg4_srv\shared\ and ..\vxg4_srv\custom\ = Vertex G4 is installed on a server.

Examples of setting values (vxsettings.xml)

field_alias_pic DESCRIPTION, DESCR
The field DESCRIPTION in Vertex G4's drawing archive (d_PICREG) corresponds to the field DESCR in the Flow drawing object.

field_alias_mod DESCRIPTION, DESCR
The field DESCRIPTION in Vertex G4's model archive (d_MODREG) corresponds to the field DESCR in the Flow model object.

field_alias_item CALC_WEIGHT, WEIGHT
The field CALC_WEIGHT in the Vertex G4 item corresponds to the field WEIGHT in the Flow item object.

Here’s the translation:

Field_alias definitions of setting values

In the setting values of Vertex G4, it is possible to define the correspondence of Flow's fields to the corresponding fields in Vertex G4.

This can be utilized, for example, when creating drawing forms that receive their information from the Vertex G4 archive and Flow. If the field_alias definitions exist, the same text macros can be used in both forms.

Edit field_alias_x setting values:

(1) Select the action File > System Settings > Edit.

  • Vertex G4 opens the dialog window System Settings.

(2) Select the checkbox Administrator View.

(3) In the left tree, select the keyword group pdm.

  • Vertex G4 displays the setting values related to Flow.

(4) Filter the field_alias keywords to the list.

  • Type field_alias in the Key column of the lower blue row

  • and select Use filter for keywords.

(5) If necessary, add a row by clicking the Data button at the beginning of the row and selecting the context-sensitive action New Keyword or Copy Keyword and Paste Keyword.

Here’s the translation:

The text's hidden code #PDMSPEC# corresponds to the line in the Alias file:

# alias PDMSPEC PDMITEM.SPEC:a

This retrieves the content of the SPEC field from the Flow item.

The text's hidden code #PDMSPEC# corresponds to the line in the Alias file:

# alias PDMPROJ_OBJCODE PDMITEM.PDMPROJECT.OBJCODE

This retrieves the project identifier related to the Flow item.

Format of the Alias File

When information is retrieved from Flow, the format of the line is:

CODE
# alias PDM<text macro hidden code> <connection type>.<field name>

Connection Types:

  • PDMPROJECT (Connection to project)

  • PDMSUBPROJECT (Connection to subproject)

  • PDMPRODUCT (Connection to product)

  • PDMCUSTOMER (Connection to customer)

  • PDMITEM (Connection to item)

The field name can be one of the following:

  • Flow field name

  • The corresponding field name used by G4, if a field_alias_xxx definition exists

  • Flow's extended attribute.

Here’s the translation:

Field mappings according to the standard version in G4’s system settings (vxsettings.xml):

Between the Drawing Archive (G4) and the Drawing Object (Flow). Field names in order: G4, Flow.

CODE
field_alias_pic  "DESCRIPTION" "DESCR"
field_alias_pic  "CLASS" "CLASSIFICATION"
field_alias_pic  "CALC_WEIGHT" "WEIGHT"
field_alias_pic  "DESCRIPTION_E" "DESCR1_EN"
field_alias_pic  "DESCR2" "DESCR2_FI"
field_alias_pic  "DESCR2_E" "DESCR2_EN"
field_alias_pic  "DESCR3" "DESCR3_FI"
field_alias_pic  "DESCR3_E" "DESCR3_EN"

Between the Model Archive (G4) and the Model Object (Flow). Field names in order: G4, Flow.

CODE
field_alias_mod  "DESCRIPTION" "DESCR"
field_alias_mod  "DESCRIPTION_E" "DESCR1_EN"
field_alias_mod  "DESCR2" "DESCR2_FI"
field_alias_mod  "DESCR2_E" "DESCR2_EN"
field_alias_mod  "DESCR3" "DESCR3_FI"
field_alias_mod  "DESCR3_E" "DESCR3_EN"
field_alias_mod  "CALC_WEIGHT" "WEIGHT"
field_alias_mod  "CLASS" "CLASSIFICATION"

Between the Item Database (G4) and the Item Object (Flow). Field names in order: G4, Flow.

CODE
field_alias_item  "DESCRIPTION" "DESCR"
field_alias_item  "CALC_WEIGHT" "WEIGHT"
field_alias_item  "CLASS" "CLASSIFICATION"
field_alias_item  "WEIGHTED" "MEASURED"
field_alias_item  "STORED" "INSTOCK"
field_alias_item  "MANUFACT" "PURCHASE"
field_alias_item  "DESCRIPTION_E" "DESCR1_EN"
field_alias_item  "DESCR2" "DESCR2_FI"
field_alias_item  "DESCR2_E" "DESCR2_EN"

The field name in the alias file is the Flow field name.

Example:

CODE
# alias PDMITEMCODE PDMITEM.OBJCODE:a

The value of the hidden field #PDMITEMCODE# in the drawing retrieves information from the OBJCODE field of the Flow Item object.

Here’s the translation:

In this case, the field name is one of the following:

  • AUTHOR.NAME (Editor's name)

  • AUTHOR.USERNAME (Editor's username)

  • AUTHOR.INITIALS (Editor's initials)

  • CREATOR.NAME (Original author's name, "Creator")

  • CREATOR.USERNAME (Original author's username, "Creator")

  • CREATOR.INITIALS (Original author's initials, "Creator")

  • APPROVER.NAME

  • APPROVER.USERNAME

  • APPROVER.INITIALS

  • APPROVED.DATE

  • STATUSID.NAME

  • PRIMARYFILE.NAME

  • CREATIONTIME.DATE

  • MODIFIEDTIME.DATE

  • CREATIONTIME.DATEZEROS

  • MODIFIEDTIME.DATEZEROS

  • VERIFIER.NAME

  • VERIFIER.USERNAME

  • VERIFIER.INITIALS

  • VERIFIED.DATE

  • D_DATE.VER_0

  • DRAWN_BY.VER_0

  • CHECK_BY.VER_0

  • CHECK_DATE.VER_0

  • ACCEPT_BY.VER_0

  • ACCEPT_DATE.VER_0

  • CLASSIFICATION_DESCR

Field_alias definitions in the settings

The field name in the alias file corresponds to the name of the field used by G4, if the field_alias_x definition exists.

CODE
field_alias_pic  "G4 field name" "Flow field name"
field_alias_mod  "G4 field name" "Flow field name"
field_alias_item "G4 field name" "Flow field name"

Example:

CODE
field_alias_pic  "DESCRIPTION" "DESCR"

The value of the hidden field #DESCRIPTION# in the drawing retrieves information from the DESCRIPTION field in Vertex G4's drawing archive or, if a Flow connection exists, from the DESCR field of the Flow Drawing object.

The field name is Flow's extended attribute

An extended attribute refers to information for which there is no corresponding field in Flow; instead, the information is generated programmatically during execution.

Examples:

CODE
# alias PDMITEM_DESCR PDMITEM.AUTHOR.INITIALS

The value of the hidden field #PDMITEM_DESCR# in the drawing retrieves the initials of the modifier of the Flow item object.

CODE
# alias PDMPROD_STATUS PDMITEM.PDMPROJECT.STATUSID.NAME

The value of the hidden field #PDMPROD_STATUS# in the drawing retrieves the human-readable name of the status of the Flow project object.

Retrieve information using a connection chain

Information can be retrieved in the drawing template, for example, from a project that is related to an item, which in turn is related to the drawing.

The connection chain is described using identifiers:
PDMPROJECT, PDMSUBPROJECT, PDMPRODUCT, PDMCUSTOMER, PDMITEM

A period is used as the separator in the path, e.g.
PDMITEM.PDMPROJECT.OBJCODE

The previous example means that information is retrieved using the connection chain of drawing-item-project.

  • Only one connection is allowed to be found as you move from left to right in the path.

  • If multiple connections are found, an error message will be displayed.

The previous example retrieves information from the project, even if the item is related to a subproject that is related to the project. If you want information from the subproject related to the item, the chain should be in the form:
PDMITEM.PDMSUBPROJECT.OBJCODE

An extended attribute (e.g., AUTHOR.NAME) can also be used when retrieving from behind the connection chain.

Examples:

TEXT
# alias PDMPROD_OBJNAME PDMITEM.PDMPROJECT.PDMPRODUCT.OBJNAME

The value of the hidden text field #PDMPROD_OBJNAME# in the drawing retrieves the name (OBJNAME) of the product (PDMPRODUCT) associated with the project (PDMPROJECT) related to the item (PDMITEM) in Flow.

TEXT
# alias PDMPROD_STATUS PDMITEM.PDMPROJECT.PDMPRODUCT.STATUSID.NAME

The value of the hidden text field #PDMPROD_STATUS# in the drawing retrieves the name (NAME) of the status (STATUSID) of the product (PDMPRODUCT) associated with the project (PDMPROJECT) related to the item (PDMITEM) in Flow.

TEXT
# alias PDMPROJ_DESCR PDMPRODUCT.PDMPROJECT.DESCRIPTION

The value of the hidden text field #PDMPROJ_DESCR# in the drawing retrieves information from the description field (DESCRIPTION) of the project (PDMPROJECT) associated with the product (PDMPRODUCT) in Flow.

TEXT
# alias PDMPROD_OBJNAME PDMITEM.PDMPROJECT.PDMPRODUCT.PDMCUSTOMER.OBJNAME

The value of the hidden text field #PDMPROD_OBJNAME# in the drawing retrieves the name (OBJNAME) of the customer (PDMCUSTOMER) associated with the product (PDMPRODUCT) linked to the project (PDMPROJECT) related to the item (PDMITEM) in Flow.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.