Get Started: Creating Your First Workflow

Welcome to CAD Workflow Manager! This guide will walk you through creating your first workflow - a simple "Hello World" example that opens a SolidWorks file. This tutorial demonstrates the basic workflow creation process and introduces you to the workflow editor interface.

Overview

In this tutorial, you will learn how to:

What We're Building

We'll create a simple workflow named "Hello World" that uses the OpenSolidWorksFile activity to open a SolidWorks file. This is a fundamental workflow that demonstrates the core concepts of workflow creation in CAD Workflow Manager.

Step-by-Step Instructions

1 Open the Workflow Definitions Page

  1. Launch CAD Workflow Manager
  2. In the left navigation menu, click on "Toggle Workflows" to expand the Workflows section
  3. Click on "Definitions" to navigate to the Workflow Definitions page

You should now see the Workflow Definitions page with a list of existing workflows (if any) and a toolbar at the top.

2 Create a New Workflow

  1. Click the "CREATE WORKFLOW" button in the toolbar
  2. A new workflow editor will open with an empty canvas
Create Button on the top left corner

Figure: The Create Workflow Button

3 Name Your Workflow

  1. Click in the workflow name field (typically at the top of the canvas or in the properties panel)
  2. Type Hello World as the workflow name
  3. Press Enter or click outside the field to save
Typing the workflow name 'Hello World' in the name field

Figure: Entering the workflow name

Workflow name 'Hello World' entered and saved

Figure: Workflow name saved

Tip: Choose descriptive names for your workflows. Good naming conventions make it easier to find and manage workflows later.

Understanding the Workflow Editor

The workflow editor consists of three main areas:

  • Left Panel: Activity browser - Browse and search for activities to add to your workflow
  • Center Panel: Workflow canvas - Drag and drop activities here to build your workflow
  • Right Panel: Properties panel - Configure selected activities
Workflow editor with empty canvas showing the activity browser on the left

Figure: The workflow editor interface with activity browser, canvas, and properties panel

4 Add the Start Activity

Every workflow needs a Start activity to mark the beginning of execution. Let's add it first.

  1. In the left activity browser panel, expand the "Flow" category
  2. Locate the "Start" activity in the Flow category
  3. Click and drag the "Start" activity from the browser onto the workflow canvas
  4. Drop it on the canvas
Workflow editor showing the activity browser with Flow category

Figure: The workflow editor with activity browser - locate the Flow category

Tip: The Start activity is required for all workflows. It marks the entry point where workflow execution begins. You can only have one Start activity per workflow.

Once the Start activity is on the canvas, you'll see it as a node. This is where your workflow execution will begin.

5 Add the OpenSolidWorksFile Activity

Now let's add the SolidWorks activity that will open a file. This activity will be connected to the Start activity.

  1. In the left activity browser panel, expand the "SolidWorks" category
  2. Expand the "SolidWorks/Common" subcategory (or navigate to "SolidWorks/Common" for the OpenSolidWorksFile activity)
  3. Locate the "Open Solid Works File" activity
  4. Click and drag the activity from the browser onto the workflow canvas
  5. Drop it on the canvas near the Start activity
Activity browser showing SolidWorks category expanded

Figure: Expanding the SolidWorks category in the activity browser

Dragging the Open Solid Works File activity from the browser

Figure: Dragging the OpenSolidWorksFile activity from the activity browser

OpenSolidWorksFile activity dropped on the workflow canvas

Figure: Activity successfully added to the workflow canvas

Workflow canvas showing both Start and OpenSolidWorksFile activity nodes

Figure: Both Start and OpenSolidWorksFile activities on the canvas

The activity will appear as a node on the canvas. You can click and drag it to reposition it as needed. The Start activity should be connected to the OpenSolidWorksFile activity to create a flow.

Note: Activities are organized by category. The SolidWorks category contains activities specifically designed for working with SolidWorks files and operations. The Flow category contains workflow control activities like Start and End.

6 Configure the Activity

  1. Click on the "Open Solid Works File" activity node on the canvas to select it
  2. The properties panel on the right will show the activity's configuration options
  3. In the FilePath property field, enter the full path to a SolidWorks file you want to open
  4. For example: C:\Projects\MyPart.SLDPRT
Selecting the OpenSolidWorksFile activity to view its properties

Figure: Selecting the activity to view its properties panel

Properties panel showing configuration options for the OpenSolidWorksFile activity

Figure: Properties panel with configuration fields

Entering the file path in the FilePath property field

Figure: Entering the file path in the FilePath property

File path configured in the activity properties

Figure: File path successfully configured

Note: You can also use File Explorer to navigate to a file, copy its path, and paste it into the FilePath field. The activity supports .SLDPRT (part), .SLDASM (assembly), and .SLDDRW (drawing) file types.

Required Property:

  • FilePath: The full path to the SolidWorks file you want to open (e.g., C:\Projects\MyPart.SLDPRT)

Output:

  • DocumentId: Returns a unique document identifier (GUID) that can be used to reference the opened document in subsequent activities

Understanding DocumentId

What is DocumentId?

The DocumentId is a unique identifier (GUID) that CAD Workflow Manager assigns to each SolidWorks document when it's opened or accessed. Think of it as a "handle" or "reference" to the document that allows other activities to work with the same document.

What Activities Register/Output DocumentId?

The following activities output a DocumentId that you can use in subsequent activities:

  • OpenSolidWorksFile - Opens a file and returns its DocumentId
  • GetActiveDoc - Gets the currently active SolidWorks document and returns its DocumentId

What Activities Require DocumentId as Input?

Many SolidWorks activities require a DocumentId to know which document to operate on. Examples include:

  • Save - Saves the document specified by DocumentId
  • SaveAs - Saves the document with a new name
  • GetFullPath - Gets the full file path of the document
  • ExtractCustomProperties - Extracts custom properties from the document
  • AddOrUpdateCustomProperty - Updates custom properties in the document
  • GetVolume, GetSurfaceArea, ExtractPartData - Various part analysis activities
  • And many more SolidWorks activities...

How to Use DocumentId in Your Workflow:

  1. When you configure the OpenSolidWorksFile activity, it outputs a DocumentId
  2. You can connect this output to other activities that need a DocumentId input
  3. In the workflow editor, you can reference the DocumentId from the previous activity using variable expressions like {OpenSolidWorksFile.DocumentId}
  4. This allows you to chain multiple operations on the same document
Tip: The DocumentId is automatically managed by the system. You don't need to manually create or manage these IDs - they're generated when documents are opened and stored in a document registry that tracks all open SolidWorks documents.

7 Save Your Workflow

Your workflow is automatically saved as you work. However, you can manually save by:

  • Clicking the Save button in the toolbar (if available)
  • Or using the keyboard shortcut Ctrl+S
Workflow ready to be saved or run

Figure: Completed workflow ready for execution

8 Run Your Workflow

  1. Click the "Run workflow" button in the toolbar
  2. The workflow will execute and attempt to open the specified SolidWorks file
  3. If SolidWorks is not already running, it will be launched automatically
  4. The file will open in SolidWorks
Clicking the Run workflow button to execute the workflow

Figure: Running the workflow

Tip: Make sure SolidWorks is installed and licensed on your machine before running workflows that interact with SolidWorks files.

What's Next?

Congratulations! You've created your first workflow. Here are some next steps to explore:

Common Issues and Solutions

File Not Found

Problem: The workflow fails with a "file not found" error.

Solution: Verify that the file path is correct and the file exists. Use absolute paths (full path starting with drive letter) rather than relative paths.

SolidWorks Not Opening

Problem: SolidWorks doesn't open when the workflow runs.

Solution: Ensure SolidWorks is installed and properly licensed. Check that the SolidWorks installation path is correct in your system settings.

Activity Not Found

Problem: Can't find the OpenSolidWorksFile activity in the browser.

Solution: Make sure you're looking in the correct category. The OpenSolidWorksFile activity is located under SolidWorks → Common in the activity browser.

Related Documentation

Summary

In this tutorial, you learned how to:

  1. Navigate to the Workflow Definitions page
  2. Create a new workflow
  3. Name your workflow "Hello World"
  4. Add the Start activity to mark the beginning of your workflow
  5. Add the OpenSolidWorksFile activity to your workflow
  6. Configure the activity with a file path
  7. Run the workflow to open a SolidWorks file

This basic workflow demonstrates the fundamental concepts of workflow creation in CAD Workflow Manager. As you become more familiar with the system, you can build more complex workflows that automate multiple CAD operations.

Need Help? If you encounter any issues or have questions, refer to the activity-specific help documentation or contact your system administrator.