Run Custom Task
You can schedule tasks to run any application, using macros or command-line
arguments that you specify.
See SolidWorks
API and Add-Ins Help Topics for information about SolidWorks macro
files.
Anything that you can run from
Windows Start, Run
can run as a custom task in SolidWorks Task Scheduler. See the Help files
in the application you want to run for information about program command-line
arguments and macros in that application.
To create a task in Run Custom Task:
Click Run Custom
Task
on the sidebar, or click Tasks,
Run Custom Task.
In the dialog box, type a new title for the task
or leave the default in Task title.
In Program path,
type the path to the program you want to run, or click Browse
to locate it.
If the program requires any program
arguments,
type them in Program arguments.
To run a macro or SolidWorks
macro template, type the path in Macro
file path, or click Browse
to locate it.
If you specify a SolidWorks macro template, the token names and their
types appear in the Parameter Name
and Type columns under Task
parameters.
In each row that shows
a Parameter Name and Type,
click in the Parameter String
column and type the parameter value.
If you specify a SolidWorks
macro template, create a backup copy of the macro template file before
scheduling and running the task, or store the macro template file in a
location other than the task working directory. Click View,
Options, Task
Options to see the task working directory.
To schedule the task:
Under Task schedule,
set:
Click Finish.
The task and its title, scheduled time, scheduled
date, and status appear in the Tasks
panel. The status of the task is Scheduled.
To run a scheduled task,
your computer must be on at the scheduled start time. The SolidWorks
Task Scheduler window does not need to be open. If your computer
is off at the scheduled start time, the task runs when you turn your computer
on.
At the scheduled start time, the task is
initiated. If the task uses a SolidWorks macro template, the system creates
a copy of the macro template and replaces the token names with the specified
parameter values, then saves the file in the task working directory under
the same filename as the original SolidWorks macro template. The program
and macro commands are executed. When the task completes, the status changes
to Completed.