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> |
|