Hide Table of Contents

Set variables Dialog Box

Use the Set variables dialog to define Enterprise PDM Dispatch variables that evaluate when a Dispatch action runs.

To display this dialog box, click Variables in the Edit Action dialog box or select Userdefined Variables > New Variable.

Use variables in your scripts to store and manipulate values. You might find it useful to store the name of the selected file or the value of a file's data card, for example. You can build variables by combining predefined variables or user-defined variables. For example, if a variable Release is set to %Number%_%Rev%.pdf, the value of Release is derived by evaluating the variables Number and Rev. For example, if Number is 4 and Rev is 2, then Release is set to 4_2.pdf.

Variables are formatted as strings with the variable name enclosed in "%" signs. For example, "%PathToSelectedFile%" evaluates to the path and filename of the currently selected file when the Dispatch action runs.

The Set variable dialog prompts you with specific fields depending upon the types of the variables you are creating. For example, if you create a new variable of type Static string, a text field labeled Value prompts you for the string value.

Variables

Lists the name and information for all user-defined variables.

Add

Click to add a new user-defined variable.

Remove

Click to remove an existing user-defined variable.

Name

Specifies the name for the user-defined variable. This variable name is then referred to by enclosing it between "%" signs, for example, %VersionValue%.

The name you specify must not duplicate predefined file variables.

Type

Lets you select the type of variable to be used. Depending on the selected type, different option fields display to further specify the type.

Value

Enter a value for the variable. Click right arrow to select predefined string functions, arithmetic functions, and variables.



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Set variables Dialog Box
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: SOLIDWORKS PDM 2012 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.