Hide Table of Contents

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:

  1. Click Run Custom Task on the sidebar, or click Tasks, Run Custom Task.

  2. In the dialog box, type a new title for the task or leave the default in Task title.

  3. In Program path, type the path to the program you want to run, or click Browse to locate it.

  4. If the program requires any program arguments, type them in Program arguments.

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

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

  1. Under Task schedule, set:

    • Running mode. Specifies how often the task runs. Select Once, Daily, Weekly, or Monthly.

    • Start time.

    • Start date.

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



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:   Run Custom Task
*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 2011 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.