Creating a New Task

If you use the SOLIDWORKS PDM API to create a task add-in, you add the task to the Tasks node by creating a new task.

When you create the task, its Properties dialog box acts as a wizard, prompting you for task information. The task type you choose determines additional options you can configure after you save the new task, such as conversion options or printer settings.

The options described here are based on the SWTaskAddIn add-in that is provided by SOLIDWORKS PDM Professional.

To create a new task:

  1. Right-click Tasks and click New Task.
  2. On the Add-in screen of the task's Properties dialog box:
    1. Type the task name.
    2. For Add-in, select the task add-in you installed using the Add-in node.
      When you select the add-in, additional options are displayed in the left pane.
    3. If you created a card for the task, select it from Input card.
    4. If you want a specific user to execute the task, select the user name and password.
      The default is to allow the logged-in user to execute the task.
    5. Optionally, configure the retry behavior if the task fails.
    6. Click Next.
  3. On the Execution Method page:
    1. Select how a computer is selected to execute the task when it is initiated.
    2. Select the computers that can be used for the task.
      For a computer to be available for selection, it must be enabled for task execution. See Permitting Task Execution.

      If you do not see a recently added computer, click Refresh List.

    3. Click Next.
  4. On the Menu Command page, if you want the task to appear in the SOLIDWORKS PDM File Explorer right-click menu:
    1. Select Display a menu command in the File Explorer for this task.
    2. Type the command name.
    3. Type the text to display in the SOLIDWORKS PDM File Explorer window status bar.
  5. On the Script page:
    1. View the task add-in script and, if required, select a macro to insert such as the source file name and extension.
    2. Select the SOLIDWORKS version to use.
    3. Select the Task user interface type, which controls the configurable options that are available after you save the task.
    4. Click Next.
    After you save the task, you can edit this information using the Advanced Scripting Options dialog box, accessed from the Files page of the task's Properties dialog box.
  6. On the Permissions page, select the users and groups with permission to start the task, and click Next.
  7. On the Success Notification page:
    1. Select the users and groups to be notified if the task succeeds.
    2. Type the subject and text of the success notification.
    3. Click Next.
  8. On the Error Notification page:
    1. Select the users and groups to be notified if the task fails.
    2. Type the subject and text of the failure notification.
    3. Specify the number of times to resend the message if the notification fails and the time between resends.
    4. Click OK.
    The new task appears in the Tasks node.