Show only results for:









Custom attributes

Custom attributes provide a way to add new attributes to a model without having to rebuild the model with the UPV Builder.

If there is a valid attributes.xlsx file in UniversalPlantViewer’s data folder (eg. C:\UPV\Model\Demoplant\Data\attributes.xlsx), UniversalPlantViewer will display all available attributes, plus your custom attributes in the (custom) attributes menu on the right side of the screen for selected objects. If multiple objects are selected (using the Ctrl key) all common attributes of those objects will be displayed.

Custom attributes file

In order to use Custom Attributes, an Excel file providing the necessary information has to be created. The file has the name attributes.xlsx and has to be located in the models data folder. The file contains different tabs, explained in the following chapters.

Definition

The definition tab contains the basic information for the Custom Attributes.

Name Description
Id Identification for Custom Attributes
Name The name of the Custom Attribute as shown in the UPV attributes
SourceAttribute If the Custom Attribute is a part of an existing attribute, the existing attributes name must be declared here
Filter See chapter Filter
DataType See chapter DataType
DefaultValue The Value used when no value has been chosen by the user yet
Parameter1-3 Parameters dependent on DataType; See following Chapters for details

You can create more than one Custom Attribute with the same name. Use the same ID and Name, but a different Source attribute to do so.

DataType

Name Description Parameter1 Parameter2 Parameter3
Calculation Simple predefined calculations. See chapter Calculations Calculation identifier - -
CodeList A dropdown with differently colored options. See chapter CodeList Codelist identifier Linked Codelist attribute -
FreeText Any text Limit of Characters in the textbox; 0 for no limit - -
Numeric Any number Min value Max value Number of floating points

Filter

The Filter-tab in the configuration file contains conditions used to group items by specific parameters. Instead of the filter name, the filter condition itself can be written in the Definition tab, as long as it’s in a single cell.

For example “filter1” could not be written in the Definition tab, while filter 2 would work.

Filter 1 will be used on all objects where the attribute Pipeline begins with 03-LC-1, exactly 02-LC-1001 as well as exactly Pipeline=PR01-LS-2001.

CodeList

The CodeList tab describes the DataType Codelist used in the Definition Tab. CodeLists create dropdowns in UPV for the custom attribute.
Name: The name as shown in UPV. Every row following that has no name belongs to the attribute-name specified last. Eg, after CS_State, all values and Colours from B2 to C6 are part of the CS_State attribute.

Value: The text for the contents of the custom attribute dropdown in UPV.

Colour: The colour of the square next to the values of the attribute dropdown. When filtering for attributes, this colour will also be the colour of the corresponding 3D object in the main view.

Calculation

Calculations are predefined functions which are executed for each element.

Name Description
TOS TOS (Top Of Steel) gives back the elevation in meters on the highest point of the element.
BOS BOS (Bottom Of Steel) gives back the elevation in meters on the lowest point of the element.
ElementColor Gives back the elements current primary color as hexcode.
OriginalColor Gives back the elements original primary color as hexcode.
VisibleColor Gives back the elements color as hexcode also considering temporary UPV features (f.e. CodeList Color, highlighting, Center of Gravity, …).
StaticText Will display the value from “DefaultValue”.
Bounds Gives back the bound coordinates. Uses a format string as Parameter1 inserting the values (f.e. default is: (%lowX%, %lowY%, %lowZ%) (%centerX%, %centerY%, %centerZ%) (%highX%, %highY%, %highZ%)

Meta

The Meta worksheet tab is used for general information
Key Value
Email_To Preset value used as receiver when sending a changeset email
Email_Subject Preset value used as subject when sending a changeset email
Workcard_Header Overwrites the workcards text header
WorkcardMail_To Like email To but for workcard
WorkcardMail_Subject Workcard email subject (can use special keywords)
WorkcardMail_Body Prefix for work-card email body (can use special keywords)

The meta keys Workcardmail_Subject and WorkcardMail_Body can utilize special placeholder values which will be filled out:

Placeholder Description
%workcard% The currently selected work-cards “Work”-value
%devicename% The users device identifier
%date% Current date

Import / export all changes

You can export changes made to custom attributes to an Excel file or import changes made.

The Excel file will contain the following information:

Email

Changes made to custom attributes in the current session will be pasted to the clipboard and the email software will be started.