Equipment

Equipment : Import/Export DGN : Export-DGN Configuration File
Use the export option 'configuration' ‘<filename>’ command in MODEL to set the path of the configuration file. For example
export option 'configuration' ' C:\configs\config.txt'
Some of the commands do not fit on a single line of this document and have been split. When the user sees a character, this means that the next line of the example is really part of the same original line.
$* Configuration File header to produce html file
ATTRIBUTE_FILE htm
ENCODING UTF8
DGN_FILE yes
ATTRIBUTE_LINKAGE 32768 0
FILE_HEADER |<HTML><HEAD>|
F
ILE_HEADER |<TITLE>Sample Export-DGN HTML outputþ
</TITLE>|
FILE_HEADER |</HEAD><BODY><H1>AVEVA E3D™ Attributes</H1>|
FILE_FOOTER |</BODY></HTML>|
ELEMENT_HEADER |<TABLE BORDER><CAPTION>þ
Cell %ID1% %ID2%</CAPTION>|
ELEMENT_FOOTER |</TABLE>|
ATTRIBUTE_FORMAT |<TR><TD>%TAG%</TD>þ
<TD>%VALUE%</TD></TR>|
VALV
NAME AS |Valve|
NAME OF BRANCH AS |Branch|
SPREF AS |Specification|
POS
END_VALV
<HTML><HEAD>
<TITLE>Sample Export-DGN HTML output </TITLE>
</HEAD><BODY><H1>AVEVA Attributes</H1>
<TABLE BORDER><CAPTION>Cell 1 0</CAPTION>
<TR><TD>Valve</TD><TD>/V102</TD></TR>
<TR><TD>Branch</TD><TD>/100-B-1-B1</TD></TR>
<TR><TD>Specification</TD><TD>/A3B/VCW100</TD></TR>
<TR><TD>POS</TD><TD>12490 12280 1836.5</TD></TR>
</TABLE>
<TABLE BORDER><CAPTION>Cell 2 0</CAPTION>
<TR><TD>Valve</TD><TD>/V103</TD></TR>
<TR><TD>Branch</TD><TD>/100-B-1-B1</TD></TR>
<TR><TD>Specification</TD><TD>/A3B/VG100</TD></TR>
<TR><TD>POS</TD><TD>12490 12280 2063.4</TD></TR>
</TABLE>
... More tables omitted ...
</BODY></HTML>
Four numbers link the cells in the dgn file to the attributes in the attribute file. These are stored as an Attribute Linkage. The first two of these are constant for all cells in the file and may be set by the ATTRIBUTE_LINKAGE command. For example, a web-browser is not read and the dgn file itself has no particular requirements:
To define constant information to be placed at the start or end of the attribute file, use the FILE_HEADER and FILE_FOOTER commands. Each may be used more than once.
<HTML><HEAD>
<TITLE>Sample Export-DGN HTML Output </TITLE>
</HEAD><BODY><H1>AVEVA Attributes<H1>
and so the configuration file has three FILE_HEADER commands and one FILE_FOOTER command:
FILE_HEADER |<HTML><HEAD>|
FILE_HEADER |<TITLE>Sample
Export-DGN HTML Output
</TITLE>|
FILE_HEADER |</HEAD><BODY><H1>AVEVA E3D™ Attributes<H1>|
FILE_FOOTER |</BODY></HTML>|
These variables (%ID1% and %ID2%) are replaced whenever an element is processed by the current identification numbers (the third and fourth numbers in the dgn attribute linkage). Refer to Variables Available for a list of all available variables.
Each attribute is output using a single text format, with the variable %TAG% set to the tag defined for the attribute, and %VALUE% set to the value of the attribute.
ATTRIBUTE_FORMAT
|<TR><TD>%TAG%</TD><TD>%VALUE%</TD></TR>|
%LINKAGE1% is replaced by the first value from the ATTRIBUTE_LINKAGE command, (the first of the four linkage numbers in the dgn file) in the range from 0 to 65535
%LINKAGE2% is replaced by the second value from the ATTRIBUTE_LINKAGE command, (the second of the four linkage numbers in the dgn file) in the range from 0 to 65535
%ID1% is replaced by the first ExPLANT-I generated identification number, (the third of the four linkage numbers in the dgn file) in the range from 0 to 65535
%ID2% is replaced by the second ExPLANT-I generated identification number, (the last of the four linkage numbers in the dgn file) in the range from 0 to 65535
%#LINKAGE1%, %#LINKAGE1%, %#ID1% and %#ID2% are replaced by the same values, but in the range -32768 to32767
%TAG% is replaced with the attribute tag
%VALUE% is replaced with the attribute value
%% is replaced by a single % character
If a format ends in a single % then Export-DGN does not move to the next line of the Attribute File before the next item.
VALVE
    NAME
    
SPREF
    :MANUFACTURER
END_VALVE
If the NONEST qualifier on an element line is used then Export-DGN writes a cell to the dgn file which may contain geometry, but does not contain the cells of other elements from the configuration file (it may contain cells produced for geometry defined in AVEVA E3D™ as facets). It is recommend that the user only uses this option if the system reading the dgn file cannot cope with the default NEST option.
An example of a possible use of NONEST is when the user wants to have cells for valves, but to gather all the geometry within a branch except for the valves into a branch-cell. The user can express this as:
If the same set of attributes need to be reported for multiple element types the ELEMENTS / END_ELEMENTS commands can be used, as in the example below:
The start of the block is defined by the command ELEMENTS. Each element type that is to output the same set of attributes is then listed in the lines after the ELEMENT command. Any number of element types can be listed but they must be listed in consecutive lines. The attributes are then defined in exactly the same was as described in Choose Elements. The block is then terminated by the END_ELEMENTS command.
ALL_ATTRIBUTES: if this is included in an element-block all attributes available in the element (apart from user-defined attributes) are listed in the Attribute file
ALL_UDAS: if this is included in an element block all user-defined attributes are listed in the Attribute file.
To report on individual attributes include them by name, for example by the Q ATTS command in MODEL. To report on a UDA (user-defined-attribute) include the leading colon, in Q ATTS. It may be useful to always include one or two standard attributes, for example the AVEVA E3D™ TYPE and NAME of the element, so that they can always connect back to the AVEVA E3D™ element from which the attributes were extracted.
Combine the AS and the ASREF modifiers, for example:
As the user can see from these examples, they can chain OF modifiers, and combine them with the other modifiers.
The WRT target may be either a database reference number or an element type within the design that owns the current element directly or through the hierarchy, such as WORLD, SITE, ZONE, OWNER. It is not currently possible to specify the WRT target by an element name.
By default Export-DGN names all the cells produced for the chosen elements. These names are not particularly meaningful, but some applications and dgn file-checking utilities consider cells without names to be errors. To switch off the cell names add the command

1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Logo