Cable Trays
User Guide
Import Cable Tray Data
: Rules for Content of the Import File
Rules for Content of the Import File
An import file must have the following characteristics.
•
The file must be a valid CSV or Excel file.
•
The first row of the file contains a list of headings. Each heading represents a column in the file containing an attribute of the elements being loaded.
•
There must be a NAME column; otherwise the file does not load. The NAME column may contain the name of a new element, or the name of an existing element. If an existing element name is used, then this row is an update row for that element.
•
Another required column is the TYPE column which contains the database element type of the element being loaded, for example EQUI. If this column is absent, the file does not load. If the Project has been configured with User Defined Element Types (UDET), then this column can contain a valid UDET name (for example PUMP). If the named element already exists – but its element type does not match the TYPE in the file, then this row is ignored and an error is raised.
•
A special column that may be included is the OWNER column. If this column is present, it must contain the name of an existing element that owns each imported item when it is created. The owner name is ignored if the imported item already exists – it is not possible to change the owner of existing Cable Trays by using the OWNER column. If the OWNER column does not exist in the file, then the owner is the current location in the DESIGN DB hierarchy at the time that the file is loaded and analysed. In this case, the current database element at the time that the file is loaded must be able to contain imported elements.
•
The remaining headings in the file must be valid attribute names for the element type being loaded. The attribute names may include User Defined Attribute (UDA) names.
•
Columns cannot be added for array type attributes unless those attributes can be set using a list of values in a single field in the file. For example, the string “10 20 30” in a DESP field would set design parameter 1 to 10, 2 to 20 and 3 to 30.
•
Every row following the heading row must contain the correct number of fields (columns) as defined by the heading row.
•
Every row must contain valid values, or no values, for each field.
•
If a new element is being created, an attribute is set to its default value if a field in the file is empty. Two adjacent separators denote an empty field. The NAME and TYPE fields cannot be empty.
•
If an existing element is being modified, an attribute value remains unchanged if a field in the file is empty.
•
It is not possible to unset an attribute value from a file, other than by providing the default value. For example “X0Y0Z0” for a position.
•
Each field in the file must be a text field. Care must be taken with fields containing values that are considered by Microsoft Excel to be a formula. For example a database reference number in the window “=123/456” would be considered to be a formula because of the “=” character. To overcome this, precede the “=” with a single quote character that forces the field to be treated as a text string. If the file does not load successfully into Microsoft Excel, it will not load successfully using this import function.
Any import of new or modified element data is subject to the data access control configuration implemented for the current user and Project.
The function does not attempt to claim data automatically in an Explicit Claim database. If the data is imported into an Implicit Claim database, then the appropriate elements are claimed, if not already claimed by another user.
Example of Data used as input to this function:
Type
Name
spref
Desc
pos
Built
EQUI
/D1201
/EQUI/Storage-Vessel/TYPEA
Storage Vessel
X 9630 Y 3502 Z 6170
false
EQUI
/C1101
X 5360 Y 8850 Z 305
true
EQUI
/E1302A
/EQUI/Shell-Tube-Exchanger
Heat Exchanger
X 9630 Y 3755 Z 8385
false
EQUI
/E1302B
/EQUI/Shell-Tube-Exchanger
Heat Exchanger
X 9630 Y 3755 Z 9352
false
EQUI
/P1501A
Pump
X 9340 Y 12145 Z 645
false
EQUI
/P1501B
Pump
X 7510 Y 12145 Z 645
false
To import Unicode text from a CSV file, the file must be a Unicode format file. Some systems save CSV files as plain text files. To convert a file to Unicode format it is necessary to open the file with a tool that is capable of saving in Unicode format, for example Notepad or the transc text file conversion utility provided with the product.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.