Hide Table of Contents

Advanced Scripting Options Dialog Box

After creating a task, use the Advanced Scripting Options dialog box to modify the task add-in script, SOLIDWORKS version, or task type.

To display this dialog box:

  • When configuring a conversion task, on the Output File Details page, click Advanced Scripting Options.
  • When configuring a print task, on the Files page, click Advanced Scripting Options.
Enter script to execute in SOLIDWORKS Script of plug-in that executes task.

To modify the script:

  • Type in the text box.
  • Place the pointer in the text box and click Insert Macro.
Reset Discards changes you make to the script.
Insert Macro Inserts a macro at the cursor location in the script.

See Inserting Macros is SOLIDWORKS Task Add-in Scripts.

The following macros resolve to values in the user interface:

Macro Inserted in Script Resolves to Example
Source Folder Path <Path> Folder where the source file is located C:\MyVault\Drawings\
Vault Root Folder Path <VaultPath> Root folder of the vault C:\MyVault\
Task Instance GUID <TaskInstanceGuid> A globally unique identifier (GUID) that is used as the task ID.  
Source File Path <Filepath> Full path and file name of the source file. C:\MyVault\Drawings\ Part.sldprt

The following macros do not resolve to actual values. They remain as tokens in the script. You must add code that parses the values from the resolved value of other macros such as <Filepath>. Examples of how to do this are found in the default scripts for the Print and Convert tasks.

Macro Inserted in Script
Source File Name <Filename>
Source File Extension <Extension>
Configuration Name <Configuration>
SOLIDWORKS version to use SOLIDWORKS version used by task.

All tasks you create using the SOLIDWORKS Task Add-in must be run on a computer that has this version of SOLIDWORKS installed.

Task user interface type Determines configurable options for task.
You must save and then edit the task to see the configurable options, which are available as pages in the task's Properties dialog box.
Select one:
User Interface Type Configurable Options
General
  • Add-in
  • Execution Method
  • Menu Command
  • Script
  • Permissions
  • Success Notification
  • Error Notification
File Conversion General options plus:
  • Conversion Settings
  • File Card
  • Output File Details
Printing General Options plus:
  • Printer
  • Paper Size and Orientation
  • Margins
  • Files


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:   Advanced Scripting Options 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 2014 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.