Advanced Scripting Options Dialog Box (For SOLIDWORKS PDM Professional only)

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 box.
  • Place the pointer in the box and click Insert Macro.
Insert Macro Inserts a macro at the cursor location in the script.

See Inserting Macros in SOLIDWORKS Task Add-in Scripts (For SOLIDWORKS PDM Professional only).

The following macros resolve to values in the user interface:

 
Source Folder Path

Inserted in script: <Path>

Resolves to: Folder where the source file is located.

Example: C:\MyVault\Drawings\.

 
Vault Root Folder Path

Inserted in script: <VaultPath>

Resolves to: Root folder of the vault.

Example: C:\MyVault\.

 
Task Instance GUID

Inserted in script: <TaskInstanceGuid>

Resolves to: A globally unique identifier (GUID) that is used as the task ID.

 
Source File Path

Inserted in script: <Filepath>

Resolves to: The full path and file name of the source file.

Example: 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.

Source File Name

Inserted in script: <Filename>

Source File Extension

Inserted in script: <Extension>

Configuration Name

Inserted in script: <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