Edit Variables Dialog Box

Use the Edit Variables dialog box to create new data card variables or manage existing variables.

To display this dialog box:

  • In the Card Editor, click File > Edit Variables.
  • In a control's properties pane, click Variables.

Variable listing

Variables Lists all card variables in the vault.

Click the column header to sort.

Select a variable to display its specifics under Selected variable.

Right-click a variable and select Show where the variable is used to display a list of the data cards with controls that use the variable.

New Variable Creates a new variable in the vault.

Under Selected variable, assign specifics such as name and attribute mappings.

Remove Variable Deletes the selected variable from the vault database.
You can also right-click and select Remove.

If the variable is not used in a data card it is deleted.

If it is used, a warning lists the cards using the variable. You must delete the card or control using variable before it can be removed.

Press Ctrl + select or Shift + select to select multiple variables.
Import Lets you import variables from a previous SOLIDWORKS PDM version export file (.cvr).
History Displays a history of modifications made to data card variables.

Selected variable

Variable name Shows the name of selected variable or allows you to assign a new name when creating a new variable.

To rename an existing variable, select the variable in the list and change the name in this field.

You should not have any data cards using the variable that is being renamed open in the card editor - otherwise you will have to reselect the renamed variable for each control using it.
Variable type Defines the type of data to be stored in the variable.

Selecting a specific type for a variable ensures the correct values are saved in the variable and makes searching and sorting values more precise. For example, using the Date type ensures that searching between date ranges is handled correctly. However, a specific type may restrict the values that can be saved in the variable. For example, if the variable type is Date, all variable values must be formatted as a date.

The data types that can be stored are:
Date

Only properly formatted date values (i.e. 11/18/2008)

Decimal number

Only decimal numbers

Integer number

Only integer (whole) numbers

Text

Most types of character strings

Yes or No

Only a binary yes (1) or no (0) value

Mandatory values Card controls using the variable cannot be left empty when updating card values or checking in files. If they are, a warning describes the missing variable value.
You cannot set a variable to mandatory if file or folder cards use that variable and the vault already contains files or folders with empty variable values.
Unique values Card controls using the variable must contain a unique value when updating card values or checking in files. If they do not, a warning describes the missing variable value.

Copying files whose file data cards contain unique variables forces the values to be cleared in the destination file.

You cannot set a variable to unique if the vault contains files or folders with duplicate values.

Attributes

Use the Attributes list and Selected attribute section to set up how the selected variable is linked (mapped) to file properties.

Attributes Displays the property/metadata attribute mappings for the selected variable.

A variable can contain many sets of attribute mappings so that one variable can be used for many different data cards. For example, both the .doc and .dwg file card contain the variable Title, but each file type uses different attribute mappings.

Block name The file section that contains the properties/metadata (that is, attributes).

Enter a new block name or select from existing block names in the vault.

Different file types have different block names. For example, most custom properties in .xlsx files are found in the CustomProperty block, while .ipt files store many properties in the dtproperties block.

Depending on file type, some block names are predefined and others are custom named. For examples, see Variable Mapping.

Attribute name Identifies the part of the specified block that contains the property value. For example in a .doc file, the title property value is stored in the attribute Title, which is in the block Summary.

When you enter the attribute name, you can use * as a wildcard.

Depending on file type, attribute names are predefined or custom created. For examples, see Variable Mapping.

File extensions Enter the extensions of files that support the block/attribute mapping. Separate file extensions with commas. For example, doc, xls, ppt.
New Attribute Adds a new attribute mapping.

Type the block name, attribute name, and extensions.

Remove Attributes Removes the selected attribute.
Press Ctrl + select or Shift + select to select multiple attributes.