• No results found

Input files in attribute import

In document Tekla Structures 2016 (Page 151-155)

17 Attribute import

17.2 Input files in attribute import

Input files used in the import of user-defined attribute (UDA) values are text files, which are delimited by a comma, tab, semi-colon, space or a user-defined delimiter. The input files contain the names and values of the user-defined attributes to be imported to the Tekla Structures model.

In the input file, the column headings must contain the names of properties and user-defined attributes in model objects and drawings. The remaining lines contain the values of the properties and user-defined attributes. You must include at least one key field as a column heading. Key fields are drawing or model object properties. Tekla Structures uses the key fields to identify the model objects or drawings to which the user-defined attributes are assigned.

The key fields for model objects are:

Key field Example Action

GUID ID4FEAFC88-0 000-0004-313 3-3430383030 31

Tekla Structures assigns the user-defined attributes on this line in the input file to the model object that has a GUID value of

ID4FEAFC88-0000-0004-3133-34303830303 1. ASSEMBLY_PO S or MARK

A3 Tekla Structures assigns the user-defined attributes on this line in the input file to the assembly that has an ASSEMBLY_POS value of A3.

Repeat this line for each assembly you want to include.

Key field Example Action

PHASE 2 Tekla Structures assigns the user-defined attributes on this line in the input file to the assembly that has a PHASE value of 2.

You must also use ASSEMBLY_POS as a key field with this option.

The key fields for drawing objects are:

Key field Example Action

TYPE NAME A D4 Tekla Structures assigns the user-defined attributes on this line in the input file to the drawing that has a TYPE value of A and a MARK value of D4.

Use both key fields in the input file.

ID 134 Tekla Structures assigns the user-defined attributes in this line in the input file to the drawing object that has an ID value of 134.

If you want to use user-defined attributes of other value types than the string in the input file, you need to define them in the

import_macro_data_types.dat file, located in the ..\Tekla Structures \<version>\environments\common\system folder.

TIP If you use Microsoft Excel to create the input file, save the file with the Save as command to Text (Tab-delimited) (*.txt) format.

See also

Attribute import (page 150) Import attributes (page 150)

Examples of input files used in attribute import (page 152) Data file used in attribute import (page 154)

Attribute import settings (page 154)

Examples of input files used in attribute import

Example input file for parts

ASSEMBLY_POS and PHASE are the key fields. Tekla Structures adds several user-defined attributes to the assemblies with values that match those listed in the ASSEMBLY_POS and PHASE columns.

For example, an assembly with the ASSEMBLY_POS (assembly number) of B5 in phase 1 gets the following user-defined attributes:

STATUS: 3 USER_PHASE: 6

USER_ISSUE: 3/25/2012

The input file contains several entries for B1. In this case, Tekla Structures writes the message Duplicate entry in input file in the log file and does not overwrite the user-defined attributes that are listed earlier in the file with those that are listed later. For example, at the end of the attribute import, B1 will have the following user-defined attributes:

STATUS: 7 USER_PHASE: 3

USER_ISSUE: 3/25/2012

This input file is tab-delimited. You can also use a comma, semi-colon, space or a user-defined delimiter.

Example input file for drawings

TYPE and NAME are the key fields. Tekla Structures adds a value for the user- defined attribute User field 4 to drawings with values that match those listed in the TYPE and NAME columns.

For example, a drawing with the TYPE A (assembly drawing) and NAME B.2 gets the value 4 in the User field 4.

See also

Attribute import (page 150) Import attributes (page 150)

Input files in attribute import (page 151)

Data file used in attribute import (page 154) Attribute import settings (page 154)

Data file used in attribute import

If you want to use user-defined attributes of other value types besides string in the attribute import input file, you need to define them in the

import_macro_data_types.dat file, located in the ..\Tekla Structures \<version>\environments\common\system folder.

Theimport_macro_data_types.dat file is a simple text file listing the user- defined attributes that you can include in an input file.

You can modify the file using any standard text editor, for example, Microsoft Notepad.

You can:

• Change any of the user-defined attributes that are not key fields.

• Add user-defined attributes as INT, STRING, FLOAT, or DATE value types. The file contains the following columns:

VARIABLE_NAME, VARIABLE_TYPE, CONVERSION_FACTOR, COMMENT

NOTE Tekla Structures uses CONVERSION_FACTOR to convert imperial values to

metric values. Tekla Structures only uses this value in Imperial environments. We recommend that you check the FLOAT values to avoid conversion factor errors.

Tekla Structures treats lines starting with double forward slash characters // as comments and ignores them when reading the file.

See also

Attribute import (page 150) Import attributes (page 150)

Input files in attribute import (page 151)

Examples of input files used in attribute import (page 152) Attribute import settings (page 154)

In document Tekla Structures 2016 (Page 151-155)