You are on page 1of 292

DriveWorks Pro

Essential Training
PRO.V20

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 1


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 2
Contents
DriveWorks Pro Training Overview .................................................................................... 5
Training Prerequisites........................................................................................................ 5
About DriveWorks Pro........................................................................................................... 7
DriveWorks Live ................................................................................................................ 7
DriveWorks Live and Internet Information Services (IIS) ................................................ 8
DriveWorks Autopilot ......................................................................................................... 9
Data Integration ........................................................................................................... 10
DriveWorks User ............................................................................................................. 10
Additional Tools in DriveWorks Pro .................................................................................... 11
DriveWorks Pro Server .................................................................................................... 11
DriveWorks Data Management ........................................................................................ 11
DriveWorks License Management Tool ........................................................................... 12
DriveWorks Group Upscale Tool ..................................................................................... 12
DriveWorks Documentation ............................................................................................. 13
About this Manual ............................................................................................................ 15
Training Introduction ........................................................................................................... 17
Imagine You Design Conveyors ...................................................................................... 17
Lesson 1 ............................................................................................................................. 19
3 Step Process for automation using DriveWorks ............................................................ 21
Creating a Group and Capturing Models ......................................................................... 22
Lesson 1 Exercise ........................................................................................................... 29
Lesson 2 ............................................................................................................................. 49
Building a User Interface in DriveWorks Administrator ..................................................... 51
Lesson 2 Exercise ........................................................................................................... 57
Lesson 3 ............................................................................................................................. 69
Building Rules ................................................................................................................. 71
Lesson 3 Exercise ........................................................................................................... 77
Lesson 4 ........................................................................................................................... 107
Running your Project ..................................................................................................... 109
Lesson 4 Exercise ......................................................................................................... 113
Lesson 5 ........................................................................................................................... 123
File Name and Relative Path Rules ............................................................................... 125

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 3


Lesson 5 Exercise ......................................................................................................... 127
Lesson 6 ........................................................................................................................... 139
Tables ........................................................................................................................... 141
Lesson 6 Exercise ......................................................................................................... 145
Lesson 7 ........................................................................................................................... 151
Form Navigation ............................................................................................................ 153
Form Templates ............................................................................................................ 154
Static and Dynamic Control Properties .......................................................................... 155
Advanced Form Controls ............................................................................................... 156
Lesson 7 Exercise ......................................................................................................... 161
Lesson 8 ........................................................................................................................... 177
Dynamic Replacement Files .......................................................................................... 179
Lesson 8 Exercise ......................................................................................................... 181
Lesson 9 ........................................................................................................................... 193
Data Management ......................................................................................................... 195
Lesson 10 ......................................................................................................................... 199
Documents .................................................................................................................... 201
Lesson 10 Exercise ....................................................................................................... 207
Lesson 11 ......................................................................................................................... 220
Drawings ....................................................................................................................... 222
Lesson 11 Exercise ....................................................................................................... 224
Lesson 12 ......................................................................................................................... 252
Specification Flow ......................................................................................................... 254
Lesson 12 Exercise ....................................................................................................... 258
Lesson 13 ......................................................................................................................... 270
What is a Macro? .......................................................................................................... 272
Specification Macros ..................................................................................................... 272
Macro Buttons ............................................................................................................... 273
Lesson 13 Exercise ....................................................................................................... 276
Preparing Your Models for Automation .......................................................................... 287
Useful Information ......................................................................................................... 289
Index ................................................................................................................................. 291

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 4


DriveWorks Pro Training Overview
This training manual gives a hands-on proficiency of DriveWorks Pro.

Upon successful completion, you will be able to:

• Drive SOLIDWORKS part and assembly geometry with DriveWorks Pro.

• Create DriveWorks Pro user forms and link them to the models.

• Write Rules that determine how a model is driven.

• Modify a Drawing appearance based on Rules.

• Create Documents based on Rules.

• Modify the flow of file generation.

Training Prerequisites
To complete this training, you must have both DriveWorks Pro Administrator 20 and
SOLIDWORKS installed. SOLIDWORKS 2020 SP0 or higher is required.

You must also have downloaded the Training Content from the DriveWorks
Community. This can be obtained by logging into the Community using the link below
and scroll to DriveWorks Pro Learning Resources, under DriveWorks Pro Essentials
Training click the Files button to download the training files.

https://my.driveworks.co.uk/learn/

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 5


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 6
About DriveWorks Pro
The DriveWorks Pro Training
Manual predominantly focuses
on using DriveWorks
Administrator. Administrator is
the module in which your Groups
and Projects are created. Autopilot
However, there is more to Administrator
DriveWorks Pro beyond
Administrator.

Here, you will learn about the


functionality provided by the
other three modules of
DriveWorks Pro.

User Live

DriveWorks Live
Showcasing your entire range of product options online enables your customers to
configure their product selection, get instant quotes, accurate delivery dates, and even
place their orders with little or no required input from sales.

Making your products easy to buy, as well as easy to sell, helps you to build closer
relationships with your customers, develop brand loyalty, and positively impact the
entire sales process and the way you deliver products to market.

DriveWorks Live gives you a true global presence, helping you to reach more
customers, faster than ever before.

DriveWorks Live allows you to broadcast your DriveWorks Group to an external IP


Address. It is typically used to make your DriveWorks Implementation available for
other people internal or external to your organization.

A single license of DriveWorks Live allows you to have up to 10 concurrent online


sessions active and using your DriveWorks Pro Implementation at any one time.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 7


To summarize, DriveWorks Live:

● Is for online users.


● Displays configurator user interface in a browser.
● Is ideal for distributors & sales teams.
● Can also be used internally.
● Users cannot change the Rules.
● Users can view results in a browser.
● DriveWorks Autopilot generates results.

DriveWorks Live and Internet Information Services (IIS)


DriveWorks Live can run directly as an application or it can run as a service through
Internet Information Services (IIS). It requires IIS v7.5 or later.

IIS provides faster transmission times between IIS and compression-enabled


browsers. Dynamic Compression means faster load times for your DriveWorks user
Forms that display dynamic content (pictures, DriveWorks 3D files etc.) on the client’s
browser.

It also runs as a service on your computer/server, rather than an application. This


means that care must be taken when setting up credentials in IIS, but has the benefit
that you don't need to be logged on to a machine to run an application. Another benefit
of this is that if the machine were to restart, IIS would restart, whereas an application
would not.

There is a DriveWorks technical webinar dedicated to setting up DriveWorks Live with


IIS. DriveWorks Pro Customers can access the entire webinar library from within the
DriveWorks Community.

The DriveWorks Pro online documentation also has various topics on IIS. Google
search DriveWorks Live Install IIS to find the topic ‘How To: Install Internet Information
Services (IIS)’.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 8


DriveWorks Autopilot
DriveWorks Autopilot is a hands-free Design Automation engine that runs unattended
on a dedicated workstation or server, 24 hours a day, 7 days a week, to automatically
generate custom designs and documentation for engineering, manufacturing and sales
teams.

The key benefits of DriveWorks Autopilot are:

● Automatically generates custom product data and associated


documentation for engineering, manufacturing and sales.
● Creates 3D Models and 2D Drawings when configured with a license of
SOLIDWORKS®.
● Sends emails to notify users when jobs are complete, require attention or
need further work.
● Generates 3D Model data for viewing configured products in a web
browser with DriveWorks Live.
● Provides instant quotes for sales and frees up engineers to focus on other
productive work
● Connect to other company systems using Autopilot Connectors

DriveWorks Autopilot can automatically process the tasks created by a Specification


and create the content required.

It is also able to process and run batches of Specifications where the information has
been stored in a database, txt file or web service. DriveWorks Autopilot will actively
manage SOLIDWORKS and its performance. It will automatically restart
SOLIDWORKS to ensure that Model generation speeds are as quick as they can be. If
there are any issues, DriveWorks Autopilot will restart SOLIDWORKS and roll back to
the model it had an issue with.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 9


Data Integration
The Connectors functionality of DriveWorks Autopilot can read data from another
location and bring it into your DriveWorks Group to begin a new Specification. This is
great for integrating your DriveWorks implementation with other systems in your
organization.

You can also set up your Project in DriveWorks Administrator to export data from
DriveWorks using a Document. Data can be exported to databases, txt files or XML
files.

With these two features, you can have a two-way data exchange between DriveWorks
and other programs within your organization.

DriveWorks User
With DriveWorks User, your engineers, sales teams and other non-technical users
within your business can run your Design Automation Projects, configure custom
products, and create sales and manufacturing documentation automatically using an
installed Windows application.

All design automation and sales configurator projects are setup centrally using
DriveWorks Administrator and protected from unauthorized use and modification.

The key benefits of DriveWorks User are:

● Enables engineers, sales teams, and other non-technical users to


configure custom products using an installed Windows application.
● Enables products to be configured directly inside SOLIDWORKS or in the
standalone application.
● Prevents unauthorized use of design automation projects and modification
of design Rules.
● Automatically generates customized products and documents when used
with DriveWorks Autopilot.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 10


Additional Tools in
DriveWorks Pro
DriveWorks Pro Server
DriveWorks Pro Server is there to connect to the Group database and to assist in load
balancing the queue in DriveWorks Autopilot. It can queue automation jobs and
distribute them to be processed by users with SOLIDWORKS installed on their
computer or by any available module of DriveWorks Autopilot.

DriveWorks Data Management


DriveWorks Data Management allows you to control the references to the data in your
DriveWorks Group. If there is a requirement for you to change the path or name of a
file that is used by DriveWorks, you can use Data Management to update those
references to the correct location.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 11


You can use Data Management to relocate captured Model information, the location of
Projects, Specification information, released files and the released master files.

It can also be used to import Projects, import Specifications, reset the Specification ID,
and more. You will learn more about DriveWorks Data Management in this Training.

DriveWorks License Management Tool


The DriveWorks License Management Tool allows you to activate and return your
DriveWorks Pro fixed licenses. If you have floating licenses, it should be installed on
the machine that acts as your license server. All shared licenses can be activated in
the License Management Tool and then accessed by typing the name of the machine
where the tool is installed into the module of DriveWorks Pro that you wish to use.

DriveWorks Group Upscale Tool


The DriveWorks Group Upscale Tool allows you to take an Individual Group and
upscale it to a SQL based Shared Group. A Shared Group allows multiple access to
the Group at any one time.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 12


DriveWorks Documentation
An offline version of the DriveWorks Documentation is installed with every new release of
DriveWorks. If you do not have access to the internet, you can use the built in
documentation to find the answers to your questions in DriveWorks.

If you do have access to the internet, the DriveWorks online documentation is regularly
updated to ensure its information is up to date, as useful and easy to understand as possible
and covers every new feature that is added to DriveWorks. You can access the DriveWorks
online documentation by going to docs.driveworkspro.com.

Tip:

Because our online documentation is indexed by Google, the easiest and quickest way
to find your way to an article is to search ‘DriveWorks’ followed by the topic you require
extra information about.

For example, if you are looking for information about SOLIDWORKS best practices
you could Google search DriveWorks SOLIDWORKS best practices. The top result will
be a link to the relevant article.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 13


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 14
About this Manual
This manual is split up into 13 lessons. Each lesson has 2 sections; an introduction to
what is going to be taught and the exercises. It is important to read through the
introductions, however following the exercises is vital for completing the training
successfully.

Concepts
This covers the concepts of DriveWorks Administrator, including best practice advice
and tips.

The Concepts section can also be used post training as a reference.

Concept:

Concepts are formatted like this.

Notes:

Notes are formatted like this.

Tips:

Tips are formatted like this.

Exercise
There is an exercise for each lesson. The exercises all work on the same models.

1. Exercise instructions are formatted like this.

Jumping between different exercises is not recommended as there is a flow of


implementation from one lesson to the next.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 15


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 16
Training
Introduction
Imagine You Design Conveyors
If you worked for a company that designed conveyors, where each one you designed
was different, then you could use DriveWorks Pro to automate each design.

This training will show you how. First, let’s look at the design.

As you can imagine, based on its function, a conveyor may have to change in length,
width, height, bed type etc.

We will create a set of Forms to fill in, which will provide guidance on the selections
available. That way we know, whatever values are entered, that particular conveyor
can actually be manufactured.

In our example implementation, we will automatically produce a General Arrangement


drawing that shows the exact specification of the conveyor. Manufacturing drawings for
other components will also be automated.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 17


The Project will have Rules to determine the required sizes and specification of each
individual component.

In order to successfully implement this, DriveWorks Pro Project tasks will be


completed in the following areas:

Basic Setup
Create a Group to store all the data that can change from customer to customer.

Capture Models and Drawings


Decide which Models and Drawings will be driven, and what is driven in each case.

Form Creation
Create Forms so that data can be entered to specify a new conveyor.

This training will result in a user interface that allows the creation of new variations of a
straight conveyor automatically.

Rules
Add Rules to drive the models and drawings from the inputs on the Form.

Documents
Rules can also be used to create new documents based on your inputs. DriveWorks
Pro document types include (but are not limited to) Microsoft Excel, Word and XML
files.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 18


Lesson 1
Lesson 1 Outline
Upon successful completion of this lesson you will be able to:

• Create a new Group to store your data.

• Capture Part and Assembly information ready for automation.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 19


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 20
3 Step Process for automation using DriveWorks
The process of automating almost anything in DriveWorks Pro can be simplified into
three main steps.

Step 1 – Create and capture the content that will be created

This can include creating the databases, Office Documents or SOLIDWORKS Models
that DriveWorks can create. Once created, you must capture the parameters that
DriveWorks can alter. For a Document, this will be creating Bookmarks; for a
SOLIDWORKS Model, capturing a dimension or feature; and for a database, this will
be identifying the tables and columns that can change.

Step 2 – Design a User Interface

Once you have decided the output files and data, you can now design the user
interface for your configurator. This will be where the user of your Project will enter the
information you need. Let your creativity flow and design something that’s intuitive to
use for your target audience and matches your brand.

Step 3 – Write your Rules

Finally, you need to link the user interface (the data coming into the Project) with the
output data (the data created by DriveWorks). You do this by writing Rules. Rules can
link Controls with the captured parameters.

You can write Rules in many places throughout your DriveWorks Project. A Rule could
exist within a specific Control property to determine certain behaviour or it could be in
a Document to determine who to send an email to, as well as many more places. To
write a Rule, you will use the DriveWorks Rule Builder, this will be explained in more
detail in this manual.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 21


Creating a Group and Capturing Models
Applications
When using DriveWorks, you will be working in two applications.

SOLIDWORKS

DriveWorks Pro appears in the task pane inside SOLIDWORKS, and is used here for
capturing models, as well as displaying the forms to create new models.

The add-in inside the SOLIDWORKS task pane shows helper links where appropriate.
When you first activate the task pane, you will see a helper link telling you that you
need to open a Group. Clicking this link opens the DriveWorks Group Wizard.

DriveWorks Administrator

DriveWorks Administrator is a standalone program where you will set up your Projects,
create your Forms and build your Rules.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 22


Groups

Concept: DriveWorks Group

DriveWorks Pro uses Groups to store multiple Projects, and Projects to drive one or
more SOLIDWORKS models.

A Group can either be individual or shared.

Individual Groups only allow one user to access it at any one time. These are the
easiest form of Group to use, as they require no set up. An Individual Group is a file
which is saved on your machine. It has the file extension .drivegroup

Shared Groups are used when more than one user will work on the data in the Group
at any one time. This could mean more than one person setting up the Rules (on
different Projects) or it could mean having multiple users. A Shared Group is a
database stored in an instance of Microsoft SQL.

An Individual Group can be converted to a Shared Group at any time as long as SQL
Server (or SQL Server Express) is installed and available.

An Individual Group will be used for the purposes of this training.

A Group can be created inside DriveWorks Administrator.

Or it can be created from the DriveWorks add-in on the SOLIDWORKS Task Pane.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 23


In both cases, a wizard is used as a guide to creating new Groups.

Tip:

Help is available for any DriveWorks topic by pressing F1 or clicking the question mark
button in the top right-hand corner of the dialog.

Concept: Group Security

DriveWorks Pro uses logins with passwords to make sure that only the appropriate
people have access to the Rules and Projects. When you first create a Group, you will
be asked to create an administrator user. This can be left as the defaults (‘Admin’ with
a blank password) or set to a username and password of your choosing.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 24


Capturing Models

Concept: Helper Links

DriveWorks Pro uses helper links to guide you through the setup of your Projects. The
links will either be a way to perform an action, or a link to the DriveWorks Pro Help File
covering the relevant topic. Either way, it’s a great idea to click on the links.

Once a Group is open, a helper link appears saying that you need to capture a model.

This link will be different if there is a model open in SOLIDWORKS.

Clicking on this link captures the model in DriveWorks, and then gives further options
for capture.

Capturing is split into different sections that appear at the bottom of the DriveWorks
Pro task pane. The required section is activated by clicking on its section header.

The section headers can be resized by dragging to show icons only.

Captured Models

To open any captured model, click on the Captured Models section header. This will
display a tree view of all captured models in the current Project. Double clicking a
model in the tree will open it in SOLIDWORKS.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 25


The Captured Models section gives a quick way to open any captured file in your
Group.

Expand the tree and double click any file to open it in SOLIDWORKS. Once the
chosen file is the active model in SOLIDWORKS, you can capture its parameters.

Captured Assembly Structure

Shown for assemblies only, this section allows you to decide which parts and sub-
assemblies are to be driven by DriveWorks.

Dimensions and Features

Captured dimensions and features are given their own name in DriveWorks Pro, to
make it easier to build Rules for them later on. Each feature can also have its
advanced properties captured, depending on the feature type.

For instance, if you choose to drive a sheet metal feature, you can capture properties
such as its K factor or Bend Table.

Captured features can also include Feature Folders, which allow you to build one Rule
to control all of the features in the Feature Folder.

You do not need to capture dimensions and features for every component.

Selecting a feature or dimension in the SOLIDWORKS model window or feature tree


adds its name to the Address Text box in DriveWorks Pro.

You will then be asked to enter a DriveWorks name for the selected feature or
dimension. You can only use each name once within a single model, but you can use
the same name across different models.

Note: Design Intent

At this point, you need to understand the design intent that we have applied to the
Training models. We have mostly used planes in the models and then attached the
sketch geometry to the planes. Changing the plane offset therefore changes the size
of the model.

At the end of this tutorial is a section on good practice modeling for automation, so that
you can apply it to your models.

Custom Properties

Selecting an existing Custom Property in your model enables its value to be controlled
dynamically. New Custom Properties can be added and captured at the same time.

DriveWorks Pro has special names for some Custom Properties. These allow you to
control the color, material and texture of your models and are DWColor, DWMaterial
and DWTexture respectively. These are not case sensitive, and DWColour can be
used instead of DWColor based on your spelling preference.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 26


Instances

As well as controlling individual parts and sub-assemblies, you can control a specific
Instance of a model within your assembly.

Controlling Instances allows you to either set the suppression state or configuration of
an Instance, as well as deleting individual instances based on Rules.

Building Rules for Instances also allows you to swap out each one for a different
model.

Drawings

For each new part or assembly that you create from your masters in DriveWorks Pro,
you can have one or more Drawings associated with it. These will also then be created
based on master drawings. The Drawings section of DriveWorks Pro then allows you
to control your Drawings further. This will be covered later in the training.

Replacement Models

Rather than overloading your master models with every permutation of model that you
would ever need, DriveWorks Pro allows you to browse for replacement models that
will be swapped into the assembly based on your Rules.

File Formats

When DriveWorks Pro creates new variations of your models, you can choose to
export these files to other file formats (eDrawings, IGES, Drive3D etc.)

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 27


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 28
Lesson 1 Exercise
In this exercise, we will create a new Group from within SOLIDWORKS, and then
capture the Conveyor Assembly, including its assembly structure, dimensions,
features, custom properties etc.

1. Before you begin, extract the DriveWorksPro20-Training-Files.zip files to the


following location:

C:\DriveWorksPro\Conveyor

If you do not have the DriveWorksProTrainingFiles.zip file, please see page 5 for
information on where to download it.

Opening DriveWorks Pro inside SOLIDWORKS

DriveWorks Pro resides on its own tab in the SOLIDWORKS Task Pane. To open
DriveWorks Pro, enable and expand the SOLIDWORKS Task Pane, and then click on
the DriveWorks Logo.

1. Open SOLIDWORKS, ensure that the DriveWorks 19 add-in is activated, and


locate the DriveWorks tab on the SOLIDWORKS Task Pane.

Now we need to create a Group to store our automation information.

Creating a Group

DriveWorks Pro incorporates a wizard for creating and opening Groups. At this point,
we are only interested with creating an Individual Group.

2. Click on the helper link Click here to open a Group at the top of DriveWorks Pro to
activate the wizard or select the New Group icon .

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 29


3. Select Create a new group from the options and click Next.

4. Select Individual from the options and click Next.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 30


5. Click Browse to select a name and location for your Group.

6. Browse to the location where you extracted the Training Files to store your Group
and enter the name DriveWorksTraining.

For this training, browse to the same location as the Conveyor models folder, and call
the new Group DriveWorksTraining. If you do not have these files, you can download
them from the DriveWorks Community.

7. Click Save, then Finish to create the DriveWorks Group in the chosen location.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 31


Note: Group Login

DriveWorks uses default login information. You will be asked to login each time you
open a Group. Change this information if you wish.

When you click Finish, you will be asked to login, using the information that you
entered in the New Group Wizard.

8. Enter the username and password to allow you to logon to the Group.

If you did not change these from the defaults, the username is Admin and there is no
password.

You will now have a Group open, and a link at the top of the task pane indicating the
next step.

Capturing your Models

If you do not have any models open in SOLIDWORKS, the helper link will ask you to:

Open a model to capture it...

9. Click the link and browse for the SOLIDWORKS Assembly


StraightConveyorAssembly.SLDASM that was shipped with the training material.

10. Rebuild and save this Assembly.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 32


With the Straight Conveyor Assembly model now open, the link at the top of
DriveWorks Pro will change to:

Click here to capture the current model

11. Click the link to capture the current model.

Once captured, the Task Pane will show all the options for capturing model information
in the Capture Explorer.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 33


Captured Assembly Structure

Another helper link will now appear at the top of DriveWorks Pro stating that No
components are captured for this assembly. If clicked, the help file will open at the
relevant page.

Concept: Capturing Models

If a part or sub-assembly will not change (i.e. it is a standard component), it does not
need to be captured.

An example of this are the Foot Plates in this conveyor assembly. They do not need to
be driven using DriveWorks, therefore we will not capture them.

If they are captured, DriveWorks will create new files from them every time a new
conveyor assembly is generated. For a large assembly, this can drastically increase
generation time for the whole assembly.

This step determines which of the models in the main assembly are controlled by
DriveWorks Pro. Remember that it is not always necessary to capture every
component or sub assembly.

12. Expand the tree and check the following models:

Note: Checking a Part

If you check a part in a sub assembly, the sub assembly will automatically be checked
as well.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 34


Capturing Individual Model Parameters

This section involves selecting each captured model in turn, and then capturing each
parameter to be controlled on that model.

13. Activate the Captured Models section by clicking on its heading within the Capture
Explorer.

Capturing Model Parameters – Side Rail

14. Expand the RollerFrameAssembly and then the SideRailAssembly in the Captured
Models section and double click on the SideRail in the DriveWorks Task Pane to
open it in SOLIDWORKS.

This will also automatically change the Task Pane to the Dimensions and Features
Section.

For the Side Rail, we need DriveWorks to be able to change its length. In this model,
the length is determined by a dimension in the Base-Flange1 sketch.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 35


To select the dimension, double click the Sketch or the Feature in the SOLIDWORKS
feature tree and then select the dimension on the screen.

Tip:

If you slowly double click the text of the plane or sketch, SOLIDWORKS will prompt
you to change its name. Don’t do this. Instead, double click on the icon for the
Feature/Sketch. If you do this, you will see the dimension appear in the model window.

15. Double click Sketch1 within Base-Flange1 and click on the length dimension
that appears. The SOLIDWORKS address for this dimension will appear in the
DriveWorks Pro Task Pane.

Tip:

If you are having problems selecting the dimension, you may have Instant3D switched
on in SOLIDWORKS. This will prevent you from selecting dimensions to capture in the
model window. If this is the case, a link will appear in the DriveWorks Pro Task Pane.
Turn Instant3D off to continue.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 36


16. In the Name Text box, type a meaningful name, SideRailLength and then click
Add.

The Dimension will be added to the Dimensions folder at the top of the DriveWorks Pro
Task Pane.

The captured dimension can then be seen in the tree view.

17. Click Save on the DriveWorks Pro Task pane to save your DriveWorks Data

To save your DriveWorks Pro data click on the Save button on the DriveWorks Pro
Command Bar. This will save your data, but not the SOLIDWORKS files. Click the
SOLIDWORKS Save button to save your models.

Save your data regularly to ensure that you are not at risk of losing information.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 37


Capturing Model Parameters – Roller Frame Beam Left

18. Activate the Captured Models section by clicking on its heading within the Capture
Explorer.

19. Expand the assembly structure in the Captured Models section and double click
the model RollerFrameBeamLeft in the DriveWorks Task Pane.

This will open the Roller Frame Beam Left model in SOLIDWORKS and, because
this is a part, it will automatically select the Dimensions and Features section.

20. Double click on Sketch6 (the sketch for the Base-Flange2 Feature) to show all its
dimensions. Highlight the Frame Length Dimension (1500mm). Use the default
name FrameLength. Click Add.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 38


Note: Renamed Dimensions

DriveWorks recognizes if features or dimensions have been renamed in


SOLIDWORKS and uses the new name by default.

21. In the SOLIDWORKS feature tree, double click the Linear Pattern Feature
LPattern1. Select the dimension that determines the quantity of the pattern (its
value is 22). Use the default name, SlotQty and click Add.

We will also control the distance between each slot.

22. Orientate the view and select the dimension that determines the spacing of the
pattern (its value is 68). Use the default name, SlotSeparation and click Add.

Next, we will capture a Feature.

23. Select the Feature SideRailMounts in the SOLIDWORKS Feature Tree.

As this feature has been renamed, the name field in DriveWorks will be automatically
populated.

24. Click Add

25. Ensure that this has been added to the Feature folder. This will confirm you have
captured a Feature and not a Dimension.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 39


Next, we will capture a Custom Property

26. Select the Custom Properties Section Header.

To capture an existing Custom Property, check them in the list. You will then be able to
create a Rule for each captured Custom Property.

27. Check the check box next to DWColor.

28. Click Save in the DriveWorks Pro Task Pane (do this regularly after capturing
information in each part/assembly)

Concept: DWColor

The Custom Property DWColor is what is known in DriveWorks as a Special Custom


Property. When an RGB color value is written into this Custom Property by
DriveWorks, the color of the part will be changed.

Capturing Model Parameters – Roller Frame Beam Right

The next part to capture is called RollerFrameBeamRight. The parameters to capture


in this model are identical to those captured in the RollerFrameBeamLeft.

29. Activate the Captured Models section by clicking on its heading within the Capture
Explorer.

30. Expand the assembly structure in the Captured Models section and double click
the model RollerFrameBeamRight in the Task Pane Tree.

This will open the model Roller Frame Beam Right in SOLIDWORKS and, because
this is a part, it will automatically select the Dimensions and Features section.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 40


31. Double click on Sketch6 (the sketch for the Base-Flange2 Feature) to show all its
dimensions. Highlight the Frame Length Dimension. Use the default name
FrameLength. Click Add.

32. In the SOLIDWORKS feature tree, double click the Linear Pattern Feature
LPattern1. Select the dimension that determines the quantity of the pattern (its
value is 22). Use the default name, SlotQty and click Add.

We will also control the distance between each slot.

33. Orientate the view and select the dimension that determines the spacing of the
pattern (its value is 68). Use the default name, SlotSeparation and click Add.

Next, we will capture a Feature.

34. Select the Feature SideRailMounts in the SOLIDWORKS Feature Tree.

As this feature has been renamed, the name field in DriveWorks will be automatically
populated.

35. Click Add

36. Ensure that this has been added to the Feature folder. This will confirm you have
captured a Feature and not a Dimension.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 41


Next, we will capture a Custom Property

37. Select the Custom Properties Section Header.

To capture an existing Custom Property, check them in the list. You will then be able to
create a Rule for each captured custom property.

38. Check the check box next to DWColor.

Capturing Model Parameters – Roller Single Groove

39. Activate the Captured Models section by clicking on its heading within the Capture
Explorer.

40. Expand the assembly structure in the Captured Models section and double click
the model RollerSingleGroove in the DriveWorks Task Pane.

41. Double click on the End Plane to show its dimensions. Select the dimension that
defines the Roller Width (418mm). Use the default name RollerWidth. Click Add.

Capturing Model Parameters – Roller Double Groove

42. Activate the Captured Models section by clicking on its heading within the Capture
Explorer.

43. Expand the assembly structure in the Captured Models section and double click
the model RollerDoubleGroove in the DriveWorks Task Pane.

44. Double click on the End Plane feature to show all its dimensions. Highlight the
Roller Width Dimension (418mm). Use the default name RollerWidth. Click Add.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 42


Capturing Model Parameters – Roller End Plate

45. Activate the Captured Models section by clicking on its heading within the Capture
Explorer.

46. Expand the assembly structure in the Captured Models section and double click
the model RollerEndPlate in the DriveWorks Task Pane.

47. Double click the feature Base-Flange1 and select the dimension for the width
(428mm). Use the default name EndPlateWidth and click Add.

48. Select the Custom Properties Section Header.

Like the Frame Beams, we will also control the color of the Roller End Plate

49. Check the check box next to DWColor.

50. Next, select the File Formats tab

51. Alongside the DXF File Format select With Rules

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 43


Capturing Model Parameters – Roller Frame Assembly

52. Select the Captured Models tab and open the RollerFrameAssembly.

53. Select the Dimensions and Features tab in the DriveWorks Pro Task Pane

54. Double click the LocalLPattern1 in the SOLIDWORKS Feature Tree.

55. Capture the dimension with a value of 21 and call it RollerQuantity

56. Capture the dimension with a value of 68 and call it RollerSeparation

57. Double click the Plane called Width in the SOLIDWORKS Feature Tree.

This will display a dimension of 428mm which determines the distance between the
two Frame Beams.

58. Capture the dimension of 428mm and call it RollerBedWidth

59. Select the Instances tab and check the check box alongside SideRailAssembly
Instance 1 and SideRailAssembly Instance 2

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 44


Capturing Model Parameters – Lower Leg

60. Activate the Captured Models section by clicking on its heading within the Capture
Explorer.

61. Expand the assembly structure in the Captured Models section and double click
the model LowerLeg in the DriveWorks Task Pane.

62. Double click the feature Base-Flange1 and select the dimension for the height
(496mm). Type the name LowerLegHeight and click Add.

Capturing Model Parameters – Upper Leg

63. Activate the Captured Models section by clicking on its heading within the Capture
Explorer.

64. Expand the assembly structure in the Captured Models section and double click
the model UpperLeg in the DriveWorks Task Pane.

65. Double click the feature Base-Flange1 and select the dimension for the height
(500mm). Type the name UpperLegHeight and click Add.

Capturing Model Parameters – Horizontal Support

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 45


66. Activate the Captured Models section by clicking on its heading within the Capture
Explorer.

67. Expand the assembly structure in the Captured Models section and double click
the model HorizontalSupport in the DriveWorks Task Pane.

68. Double click Sketch1 and select the dimension for the width (510mm). Type the
name HSupportWidth and click Add.

Capturing Model Parameters – Leg Assembly

69. Select the Captured Models tab and open the LegAssembly.

70. Select the Dimensions and Features tab in the DriveWorks Pro Task Pane

71. Double click the Plane called Width in the SOLIDWORKS Feature Tree.

72. Select the dimension of 528mm and type LegWidth into DriveWorks, click Add to
capture it.

73. Expand the Mates Folder and double click the mate called UpperLegOffset

74. Select the dimension that appears (160mm)

75. Capture this dimension in DriveWorks and call it UpperLegOffset

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 46


Capturing Model Parameters – Straight Conveyor Assembly

76. Activate the Captured Models section by clicking on its heading within the Capture
Explorer.

77. Double click the model StraightConveyorAssembly in the DriveWorks Task


Pane.

78. Select the Custom Properties Section Header.

To capture existing custom properties, check them in the list. You will then be able to
create a Rule for each captured Custom Property.

79. Check the check box next to Date, DrawnBy and PartNumber.

All of the models that need controlling have now been captured. The next step is
to set up a user form for new information to be entered.

80. Save your DriveWorks Group by clicking the Save button at the top of the
DriveWorks task pane. This will save your data, but not the SOLIDWORKS files.
Click the SOLIDWORKS Save button to save your models.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 47


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 48
Lesson 2
Lesson 2 Outline
Upon successful completion of this lesson you will be able to:

• Create a new Project for your Forms and Rules.

• Create a User Interface to enter new product data.

• Use the Rule Builder to create and validate rules.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 49


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 50
Building a User Interface in DriveWorks
Administrator
DriveWorks Administrator allows you to create your forms, create tables of data, build
Rules for your models, and configure documents and other outputs.

It has a Command Bar at the top that will show you available actions depending on the
section you are on.

DriveWorks Administrator is split into sections in the Task Explorer. The number of
sections will depend on whether you have a Group open, and if you also have a
Project open.

Concept: Projects

Projects have Forms and Rules. Each Project can have multiple Forms that are linked
together to create a navigation.

Rules are then used in each Project to translate the data entered on the Forms, into
the values used to create new models.

You need to open a Group to be able to work on Projects.

There is only a small amount of functionality in DriveWorks Administrator without a


Group open. To open a Group, you can either use the Group Wizard or you can use
the Group Quick Access Drop Down. One final way to open an existing Group is to
double click on a Recent Group on the DriveWorks Today section.

Once a Group is open, you can either create or open a Project. The Project Wizard will
help you with this task.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 51


Once you have created or opened a Project, you are ready to work on your user forms.

User Forms

Forms allow users to enter information about your product.

Forms can have controls on them for entering and viewing information.

Form Designer

DriveWorks has a Form Designer for laying out your Form.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 52


Form Controls

Form Controls are items such as Labels, Text boxes, Drop Downs (Combo boxes),
Lists, Spin Buttons etc.

Concept: Adding Inputs

Adding inputs to each Form is done by clicking on the appropriate button on the
Command Bar above the Form Designer. A Text box then appears asking for a name.
You cannot use the same name twice, and try and use meaningful names. Names
cannot have spaces in them.

Control Properties

Concept: Control Properties

If you select the control on the Form, the properties pane on the right will show you all
the properties that can be set for the type of control that you have selected. Some
properties are static, which means that you set them and they stay that way until you
edit them again. Some are dynamic, which means you can build a Rule for the value.

Each Form Control has Static and Dynamic Properties.

Static Properties are properties like font, color and size.

Dynamic Properties are properties like the visibility of a control or if a control is


enabled. Different controls have different properties, for controls such as labels, they
have Text properties and for controls such as combo boxes, lists and option Groups
they have list properties.

Form Navigation

You can have as many forms as you wish, controlled by a Form navigation.

Dynamic Form navigation allows you to change the navigation based on Rules.

Concept: Navigation

Navigation requires a start point. This ensures that you always have a starting point
when you start using the forms to create your new models. It also requires a finish
point, which lets DriveWorks Pro know when to show the finish button so that you can
finalize your design and documents.

Whenever you create a new Project, DriveWorks Pro creates the first Form for you,
and creates the navigation from start to finish.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 53


The default navigation, with a single Form, therefore looks like this:

The Command Bar now has buttons specific to Form navigation, including alignment
tools to help tidy up your navigation, and buttons for adding and deleting Forms and
Decisions.

Concept: Form Decisions

You can add Decisions to your Form Navigation.

A Decision is a two-way splitter that allows you to show one of two Forms based on a
Rule.

Rule Builder

DriveWorks Pro Administrator uses a Rule Builder to assist in the creation of Rules.
The Rule Builder allows easy access to other information in your Project such as
Control Values.

It also includes a Help and Diagnostic area and a function helper to ensure that your
Rules can be validated.

The Rule is entered into the Rule Editor. You can use a combination of typing,
function wizards, or double clicking on Form Values, Constants and Variable entries
from the Project Data.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 54


Concept: Rule Builder Diagnostics

The Rule Builder has diagnostic tools built into it, to help you create accurate Rules
quickly. At the bottom of the Rule Builder you will see a Help and Diagnostics area. On
this there are 4 tabs:

Values

All of the individual elements that make up the Rule are displayed here, to help you
check your Rule. Also included here is the current result of the Rule.

Steps

Here, each Rule is broken down into sub Rules, so if you are not getting the result that
you expect you can quickly see the cause.

Drill Down

The drill down tab provides the information used in the values and steps to be
analyzed, you can expand the Rule at each stage to get to the result.

Comments

You can enter a comment for each Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 55


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 56
Lesson 2 Exercise
Create a Project

Note:

DriveWorks Administrator can be launched from the DriveWorks pane in


SOLIDWORKS.

1. Open DriveWorks Administrator.

2. Click on the Groups button in the header.

Tip:

You could also click the Open Group button on the Command Bar.

3. In the Group Wizard, select the option to Open an existing group and click Next.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 57


4. On the next screen, select an Individual Group and click Next.

5. Browse for the Group that you created in Lesson 1.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 58


6. Click Finish to open the Group and login using the username and password that
you used when creating the Group.

Tip:

If you did not change these from the defaults, the username is Admin and the
password should be left blank.

With the Group now open, the next step is to create a Project.

7. Click on the Create a Project button on the DriveWorks Administrator Command


Bar.

8. Select the option for New DriveWorks Project and click Next.

Concept: Project Templates

As well as creating a new blank Project in DriveWorks, you can create Projects from
Templates. These templates help you get started with DriveWorks by pre-creating
content that you are likely going to need.

Concept: Imported Projects

If you have started your DriveWorks implementation in DriveWorksXpress or


DriveWorks Solo, you don’t need to start again. You can select the option to Import a
Project from DriveWorks Solo or DriveWorksXpress and continue where you left off.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 59


9. Browse for the location that you wish to store the Project. For this Training, create
a folder within the Conveyor folder called StraightConveyor and save the new
Project there.

10. Click Select Folder on the Browse for Folder dialog.

By default, DriveWorks will use the folder name as the new name for the Project. You
may change this name if you would like.

11. Click Finish to create the new Project. The newly created Project will now be open
in DriveWorks Administrator.

Form Design

12. Activate the Form Design by selecting the Form Design task in the Task Explorer.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 60


The Form Designer will default to showing the first Form. For a new Project, there is
only one by default.

The Form is empty. You can now start adding Form Controls.

Form Controls
There are many different types of Form Controls available in DriveWorks Pro, all of
which can be seen across the top of the Form Designer on the Command Bar.

Which Controls you use in your Projects is completely up to you. Some Controls are
better suited to some inputs than others. A good example of this would be that a
Numeric Text box is better suited to a numeric input than a Text box and a Check Box
Control for this input would be completely unsuitable.

Throughout this Training Manual, you will use several different Controls, but to begin
we will create three Slider Controls that determine the Height, Width and Length of the
conveyor.

Slider

13. Click on the Slider button on the Command Bar. A Text box will appear asking for
a name for the Slider. Call it ConveyorLength.

14. Click the OK button to create the control.

Note:

The name that you provide when you create the control is applied to the Name
Property and the Caption Property of the control.

A control’s Name Property cannot have any spaces in it as this is what DriveWorks
uses as an ID for that control

A control’s Caption Property can have spaces and is simply the displayed name of
the control.

If the name you provide when creating the control has capitalized words, such as
ConveyorLength, then DriveWorks Pro will recognize this and add in the space in the
caption.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 61


When any control is highlighted, the Property Pane appears on the bottom right, which
allows you to set static properties such as Caption, Position (Top and Left) and Size
(Height and Width) as well as dynamic properties such as the items in a list for a
Combo box Control, or the picture shown in a Picture Box.

Static properties are shown with a grey icon. Dynamic properties have a green icon.
Fixed properties have no icon.

15. Set the following Properties by typing in the box next to the property:
Maximum = 3000
Minimum = 1000
16. Create another Slider called ConveyorWidth

17. Set the following Properties by typing in the box next to the property:
Maximum = 1000
Minimum = 400
18. Create a third and final Slider called ConveyorHeight

19. Set the following Properties by typing in the box next to the property:
Maximum = 1200
Minimum = 600

Concept: Alignment Guides

Alignment Guides control alignment snapping in the Form Designer while dragging a
control (or Group of controls). To temporarily disable the snapping hold down the Ctrl
key whilst dragging the control.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 62


Combo box

20. Create a Combo Box called FrameColor.

Note:

A Combo box is a drop down list where any single value can be selected. The list in
the drop down can be static or it can dynamically change based on a Rule.

To populate the list of items in the Combo box, we need to enter a value for the Items
Property in the Property Grid.

Note:

Lists in DriveWorks Pro are represented by a single string, with each separate item in
the list separated with a pipe bar (|). So, for example, if you want a list with Monday,
Tuesday and Wednesday as static values, you would need to enter
"Monday|Tuesday|Wednesday".

Even though we need static values in the Items property, we are still going to use the
Rule Builder.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 63


21. Click in the Items property for the Combo box. A button will appear to the right
of the property value.

22. Click the button to launch the Rule Builder.

Tip:

You need to click in the Items property for the button to appear.

The Rule Builder is split into numerous sections, with its own Command Bar, a Rule
Editor, Help and Diagnostics and a browser to find your Project Variables and Form
Values.

In this case, because the list in the Combo box will be static, standard text can be
typed in the Rule Editor text area.

23. Click in the Rule Editor and type "Red|Blue".

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 64


Note:

As this is static text, make sure that you include the quote marks.

24. Click OK on the Rule Builder. The Rule will appear in the Item property in the
Property List.

Combo box

25. Create a second Combo box called SideRails

26. Build a Rule for the Items Property

27. Click on the Rule Editor and type “Left|Right|Both Sides|None”

Check Box

28. Create a Check Box called ElevatedSideRails.

Note:

A Check Box can either be checked or unchecked. When checked, its value is TRUE.
When unchecked, its value is FALSE. They are therefore very useful for determining
whether something is required or not.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 65


You should now have a Form that looks like this:

Concept: Group Controls

Controls can be grouped together to reposition. Select a control then hold down Shift
or Ctrl while selecting other controls. Right click and select Group Controls to Group
them together. To ungroup, select any control within the Group, right click and select
Ungroup Controls.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 66


Test Mode

29. Click the Test button on the Command Bar to test your Form.

Concept: Testing your Form Controls

Clicking the Test button at the top of the Form Designer allows you to see
what the Form will look like and also test it and enter values into the controls.

Clicking the Test button again returns you to design mode.

Your Form is now ready to drive most of the features that you have captured so far.
We can therefore move on to the Model Rules that will link your Form values to the
information that you have captured in your models.

Have a go at changing some of the static properties for each control. Also experiment
with the align tools at the top of the Form Designer, as well as moving the control
around the Form and making them bigger or smaller.

Note:

Any values you enter into your controls in test mode will become the default values for
those controls.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 67


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 68
Lesson 3
Lesson 3 Outline
Upon successful completion of this lesson you will be able to:

• Use Constants to store static values.

• Use Variables to evaluate re-usable rules.

• Build Rules for the Captured Models.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 69


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 70
Building Rules
First, let’s look at the models to determine some of the Rules that need to be written.

From this picture, it is easy to see that to calculate the quantity of Rollers you need to
consider the input value for the Conveyor Length and the Roller Spacing.

So, the Rule would be:

Roller Quantity = Conveyor Length / Roller Spacing

With the result rounded down to the nearest whole number

Your Form already has an input for the Conveyor Length and the Roller Spacing is a
constant value of 68.

It would be very straight forward, knowing the static value, simply to type that in, so
that the Rule would be:

Roller Quantity = ConveyorLength / 68

And there would be nothing wrong with that, but if the standard Roller Spacing was
ever to change, there would be more work to do. You would need to find every Rule
where it was used and re-type the value. The Project wouldn't be as flexible.

It is therefore better to break the Rule down into Variables and use a named Constant
for the Roller Spacing.

It also makes it easier to track and validate your Rules if you use a name that can be
understood easily.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 71


Therefore, the Rule will now look like this:

Roller Quantity = ConveyorLengthReturn / DWConstantRollerSpacing

Note:

The word Return after ConveyorLength indicates that the value is being returned from
the control called ConveyorLength.

The next thing to account for is a buffer at either end of the conveyor to ensure that the
rollers are not flush to the edge of the Frame Beam. Therefore, instead of just using
the Conveyor Length we will subtract an offset from each end of the Conveyor Length.

We will create this additional side calculation as a DriveWorks Variable. We will do this
for two reasons: First, the Conveyor Length minus the End Gap will be used in other
locations around this Project. Secondly, the Rule for Roller Quantity will be easier to
read if there are multiple levels to the Rule, rather than every calculation at the top
level.

Therefore, the Rule for Roller Quantity will now be:

DWVariableRemainingLength / DWConstantRollerSpacing

Where DWVariableRemainingLength =

ConveyorLengthReturn – (2*DWConstantEndGap)

And where:

DWConstantEndGap = 41

Finally, we can use the RoundDown function in DriveWorks to round the result down to
the nearest multiple.

Concept: Functions

A function is divided into multiple sections where each one is separated by a comma.
The Round Down function below has two sections. The first is the calculation to be
rounded and the second defines the number of digits to round down to.

RoundDown( DWVariableRemainingLength / DWConstantRollerSpacing , 0)

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 72


Constants

Constants allow the storage of static values or text that may or may not change in the
future.

In DriveWorks Pro, Constants are automatically prefixed with DWConstant.

For instance, DWConstantRollerSpacing can be set to a static value of 68.

Constants can be filtered for easy retrieval.

Constants are added, edited and deleted using the Command Bar within the Constants
section of DriveWorks.

Variables

DriveWorks can store calculated values that you can re-use in other Rules. Each
Variable can be a calculation or Rule which can be re-used multiple times.

In DriveWorks Pro, Variables are automatically prefixed with DWVariable.

For instance, DWVariableRemainingLength can have the following Rule

ConveyorLengthReturn – (2*DWConstantEndGap)

Variables can be categorized and filtered for easy retrieval.

Concept: Variable Categories

Since Projects may have a lot of Variables, DriveWorks Pro allows you to categorize
them.

Variables are added, edited and deleted using the Command Bar when on the
Variables section of DriveWorks.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 73


Variables are built using the DriveWorks Rule Builder.

Model Rules

DriveWorks Pro has a separate section on the Task Explorer for building Model Rules.

Concept: Model Rules

Models are captured in the Group to enable them to be used across different Projects.

Captured Models are not automatically added to the Model Rules for each Project, this
is because you can choose to drive No Models, One Top Level Model or More than
One Top Level Model.

Therefore, you need to tell this Project which models to use.

Models are added to the Project by clicking on the Add button on the Command Bar to
display a list of all models captured in the Group.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 74


These are listed by Top Level Assembly.

Checking a model and clicking Add will add it to the model list for this Project and to
enable Rules to be built for it.

Checking the Top Level Assembly will add all children that have been captured.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 75


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 76
Lesson 3 Exercise
Constants

1. Select the Define Constants task in the Task Explorer on the left.

2. Click Add on the Command Bar to create a new Constant.

Note:

Creating Constants is similar to creating Form Controls; a Text box will appear asking
for a name for your new Constant. DriveWorks Pro applies validation to ensure your
name is valid, to prevent the use of invalid characters or the creation of two Constants
with the same name.

3. Type FrameBeamWidth for the new name and click OK.

4. Enter 50 in the Value column for this new Constant.

Note:

Double click in the Value Column to edit the Constant Value at any point.

5. Create a Constant called SheetMetalThickness and click OK.

6. Give this Constant a value of 2.

7. Create a Constant called FootToLegOffset and click OK.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 77


8. Give this Constant a value of 5.

9. Create the remaining constants in the table below:

Constant Name Value


FrameBeamHeight 200
LegToBeamOffset 24
BracketHeight 150
RollerGap 68
EndGap 41

Variables

10. Select the Define Variables task in the Task Explorer.

11. Click Add Variable to add a new Variable.

12. Type TotalLegHeight for the name and click Enter.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 78


The TotalLegHeight Variable will contain a rule which calculates the Total height of
the leg assembly.

The image above shows, the TotalLegHeight is calculated by subtracting the


FrameHeight and LegToBeamOffset Constants, from the ConveyorHeight Form
Control.

Note:

You can change the name of a Variable at any time by double clicking on the name in
the list. You will be asked to confirm the action. This is because, when the name is
changed, DriveWorks Pro will need to search for every Rule in your Project to see
where that Variable has been used, and then update those Rules where it is found.

13. With the new Variable selected in the Variable List, click Build on the Command
Bar to launch the Rule Builder.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 79


Note:

You can also open the Rule Builder by either double clicking the Variable, or by
pressing Ctrl + B when the Variable is selected.

14. In the Rule Builder, ensure that you have the Controls Tab active on the right, then
double click on the Form Control ConveyorHeight in the list of controls.

Note:

DriveWorks Pro adds the word Return as a suffix for Form Controls. This tells
DriveWorks that this is a Form Control.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 80


15. In the Rule Editor, after the text ConveyorHeightReturn, type – (minus)

16. Select the Constants tab on the right and double click FrameBeamHeight

This value will be added to the Rule Editor in the location of your cursor.

17. Once again, in the Rule Editor, type –

18. This time, instead of double clicking the next value, try typing leg.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 81


Concept: Rules Insight

As you start to type in the Rule Editor, a box will appear which attempts to predict the
item you are typing. Once the item you require appears in the list, you can select it and
press the space bar to have DriveWorks complete that input.

19. LegToBeamOffset will be top of the Rules Insight dialog, ensure it is selected and
press the space bar. The DriveWorks Rule Builder will complete the input for
DWConstantLegToBeamOffset.

Your Rule will now look like this:

20. Click OK to complete the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 82


Variable Categories

21. Click the Add Category button on the Command Bar.

22. Enter the name Sizes and click OK.

Tip:

You can also press the Enter key to accept your name, as long as your name is valid.

This adds your category to the tree. Categorizing Variables makes maintenance and
development of your DriveWorks Projects easier.

To add new Variables to this Category, select the Category in the tree before clicking
Add Variable.

To add existing Variables to a Category, drag them onto the Category item in the tree.

23. Drag the TotalLegHeight Variable onto the Sizes Category

We can now set Variables for the remaining Leg Sizes, Side Rail Height as well as the
Roller size.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 83


24. Select the Sizes Category in the tree to add the next Variable into that Category.

25. Click Add Variable to add a new Variable.

26. Give the Variable the name UpperLegHeight and press Enter.

27. With the UpperLegHeight row selected, click Build on the Command Bar to
launch the Rule Builder.

The UpperLegHeight Variable is going to calculate the height of the upper section of
the Conveyor Leg assembly. This value needs to be three quarters of the existing
TotalLegHeight Variable.

The Rule for UpperLegHeight needs to be:

RoundUp((DWVariableTotalLegHeight / 4) * 3 ,0)
This Rule uses a function to round up the result of the calculation to the nearest whole
number. This is because a high degree of accuracy is not needed to manufacture this
part. The steps below will walk you through creating this rule.

28. Select the Variables tab on the right and double click TotalLegHeight

29. Type /4

We now need to multiply this value by 3. Therefore, we must first wrap the existing part
of this calculation in parentheses.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 84


30. Add an opening bracket before DWVariableTotalLegHeight

31. Add a closing bracket after /4

32. Type * 3

33. Highlight the entire Rule and click the Functions button on the Rule Builder
Command bar.

34. Use the filter bar at the top of the Functions Dialog to filter for the word round.

35. Double click on the function RoundUp. This will open the RoundUp Function
Wizard in the Rule Builder and populate the first item with the Rule you highlighted.

36. Type 0 in the Digits text box to ensure the function rounds up to a whole number.

37. Click Finish to update the Rule

38. Click OK to accept the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 85


Tip:

The Rule Builder has diagnostic tools built in. These help you create accurate Rules
quickly. At the bottom of the Rule Builder you will see a Diagnostics area. On this there
are 4 tabs:

Values

All the individual elements that make up the Rule are displayed here, to help you
check your Rule. Also included here is the current result of the Rule.

Steps

Here, each Rule is broken down into sub Rules, so you can quickly see the cause if
you are not getting the expected result.

Drill Down

This is very powerful and allows you to drill down into the values that contribute to the
Rule, including drilling into their Rules as well.

Comments

You can enter a comment for each Rule.

Next we need to calculate the offset from the bottom of the Leg Assembly to the
bottom of the Upper Leg Part. The Upper Leg Part’s height was calculated in the
UpperLegHeight Variable

This is going to be done by subtracting the UpperLegHeight from the TotalLegHeight.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 86


39. Click Add Variable to add a new Variable.

40. Give the Variable the name UpperLegOffset and hit Enter.

41. With the UpperLegOffset row selected, click Build on the Command Bar to launch
the Rule Builder. Build the rule shown in the image below.

The Rule for this Variable needs to be as follows:

Tip:

When you find you have a lot of Constants, Variables or Controls, use the filter box to
limit what is displayed.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 87


42. Add another Variable called LowerLegHeight.

The LowerLegHeight Variable will store a rule which calculates the height of the Lower
Leg Part contained within the Leg Assembly.

The height of this Part is equal to the TotalLegHeight Variable minus the Bracket
Height Constant value. There is also a small offset at the top and bottom of the
Bracket, this offset is the same at the top and bottom, canceling itself out so we do not
need to add it into the Variable rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 88


43. Build the following Rule for this Variable.

Note:

You can change the appearance of the Rule Editor by clicking on the Settings button
on the Command Bar.

44. Add another Variable called SideRailHeight.

45. Click Build

This Rule will use an IF Function.The SideRailHeight Variable will later be used to
control which SOLIDWORKS configuration the Side Rail Assemblies are saved in.

Concept: IF Function

An IF Function allows you to determine an outcome when a condition is met. You can
also determine the outcome if that condition is not met.

In this example, the condition is that the Elevated Side Rails Check Box Control equals
true, aka, it has been checked. If this condition is met, the result of the Rule must be
the value “Tall”. If the condition is not met, the result of the Rule must be “Short”. In
this case, these values are the names of the configurations in the Side Rail Assembly
that we will be switching.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 89


46. Click the drop down arrow below the Functions button and select If

For an IF function, three text boxes allow you to enter the three arguments.

These arguments are:

Condition This is the condition that will be evaluated

Value If Condition Is True If the condition is evaluated to be TRUE, use this value

Value If Condition Is False If the condition is evaluated to be FALSE, use this value

47. Enter the following into the Function Wizard:

Condition ElevatedSideRailsReturn = TRUE

Value If Condition Is True "Tall"

Value If Condition Is False "Short"

Tip:

You can use the Project Data pane on the right of the Rule Builder to reference values
from your Project in the Wizard. Simply place the cursor in the Wizard text box and
then double click the value you require in the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 90


48. Click Finish on the If Function wizard.

49. Your Rule will now look like this:

50. Click OK to complete the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 91


Rollers Category

Two Variables will be created which will calculate the number of rollers needed on the
Conveyor (RollerQty), as well as the separation between them (RollerSeparation).
These rules are explained at the beginning of this lesson. Here is the image again for
your reference.

Before creating any more Variables, a new Variable Category will be created to
separate them from the other Variables that have already been added.

51. Select the Sizes Category and click the Add Category button on the Command
Bar.

52. Enter the name Rollers and click OK.

53. Select the new category and click Add Variable to add a new Variable.

54. Give the Variable the name RemainingLength and hit Enter.

This Variable will calculate how much space is left for the rollers after an end gap has
been removed from the total conveyor length.

55. With the RemainingLength row selected, click Build on the Command Bar to
launch the Rule Builder.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 92


56. Build the following Rule.

57. Click Add Variable to add a new Variable called RollerQty

The RollerGap Constant is the minimum distance that the rollers can be separated by.
Therefore, the Remaining Length divided by this value, then rounded down, will give
us the Roller Qty.

58. With the RollerQty row selected, click Build on the Command Bar to launch the
Rule Builder.

59. Build the following Rule:

Tip:

Follow the process previously described when using the RoundUp function. Create the
calculation first, highlight the Rule and then use the RoundDown Function Wizard to
round it down to a whole number

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 93


60. Click Add Variable to add a new Variable called RollerSeparation

This Variable is the actual separation that the Rollers need to be at so that the rollers
are spaced equally across the length of the conveyor, with approximately the same
gap at either end.

61. With the RollerSeparation row selected, click Build on the Command Bar to
launch the Rule Builder.

62. Build the following Rule:

Note:

This function is rounding to one decimal place. This is determined by the value 1 at the
end of the function.

You should now see the following Variables in your list (depending on the values you
entered when testing your Form, you may have different results in the Value column
for your Variables).

Tip:

To see all Variables, select ‘Categories’ and click ‘Show Child Variables’ from the
Command Bar

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 94


Model Rules
We are now ready to build the model Rules, and then have DriveWorks create new
SOLIDWORKS files based on the information we enter in the Form.

The first step though is to tell your DriveWorks Pro Project which models to control.

Note:

Captured Models are not automatically added to the Model Rules, this is because you
can choose to drive No Models, One Top Level Model or More than One Top Level
Model.

Therefore, you need to tell this Project which models to use.

63. Select the Model Rules task in the Task Explorer.

64. Click the Add button on the Command Bar.

65. Check the box next to Straight Conveyor Assembly and click OK.

You will now see the Straight Conveyor Assembly added into the Component Tree.

Note:

You only need to add the top level assembly. All of its Sub-Assemblies and Parts will
be added to the tree automatically.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 95


66. Click Select All from the Command Bar to select all the associated components.

This will show all the captured items for all the components.

Tip:

Clicking on a model within the tree inside Model Rules will show an image of the file as
well as the captured information about the file. This can be useful if you have many
similar files in your model tree that are not named descriptively.

You will notice that some Rules have already been filled in; these are the File Name
Rule and the Relative Path Rule.

Note:

The File Name Rule determines the file name for each component when you run your
Project.

The Relative Path Rule determines the location of the new file. This can be relative to
the DriveWorks Default Specification Folder or a complete path.

The default given for these is the name of the Project, followed by an incremental
number (shown as 9999 during the design of your Project).

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 96


For the file name, the result of this Rule will be appended to the original file name of
each model.

We will be changing these Rules later in the training, but for now we will leave them as
they are.

Each Model has a Rule for Configuration. Only create a Rule for the configuration, if
you wish to change the configuration you want to use in your model.

Dimensions
Let's create Rules for the dimensions first.

Tip: Filtering

Rather than scroll up and down looking for the dimension Rules, you can type a filter in
the filter box at the top of the Rules List.

67. Type dim in the filter box to only show Rules with dim in any of its values.

68. Multi-select the RollerBedWidth, EndPlateWidth and both RollerWidth


dimensions (4 in total). Then click Build.

Tip:

Hold down Ctrl and click the dimensions one by one to multi-select them.

69. Write the following Rule.

ConveyorWidthReturn -2*DWConstantFrameBeamWidth
We will re-use this Rule in other parts of our Project throughout the training. Therefore,
it would be better suited as a Variable.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 97


Concept: Extract Variable

Having the foresight to create Variables at the start of your Project is something that is
often unrealistic. However, with the Extract Variable functionality, you can write the
Rule directly in Model Rules and later tidy up and make it more manageable by
replacing these Rules with a variable.

Extract Variable allows you to not only move that Rule to a Variable, but DriveWorks
will also search the rest of your Project for the same Rule and replace that.

70. Highlight the entire Rule

71. Right click the highlighted area and select Extract Variable

72. Type RollerWidth into the Variable name text box.

73. Ensure that Replace in all Rules is checked

74. Click OK

This will bring up a dialog that allows you to determine exactly which Rules throughout
your Project you wish to replace with the newly created Variable. If the exact same
Rule exists anywhere in the Project, it will appear in this dialog. You can then decide
whether to replace it with the Variable or ignore it.

75. Click OK again.

76. Finally, click OK in the Rule Builder to confirm the new Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 98


77. Continue building Rules for each Dimension based on the table below.

78. Select each one in turn and click the Build button on the Command Bar.

These Rules are very simple. This is either because we have already created
Variables, or because we are directly linking some Rules to Form Controls.

Tip:

When building multiple rules at once, if one of the Rules already has a Rule, that Rule
will be displayed in the Rule Editor.

Name Component Rule


RollerQuantity FrameAssembly = DWVariableRollerQty
SlotQty FrameBeamLeft = DWVariableRollerQty +1
SlotQty FrameBeamRight = DWVariableRollerQty +1
RollerSeparation FrameAssembly = DWVariableRollerSeparation
SlotSeparation FrameBeamLeft = DWVariableRollerSeparation
SlotSeparation FrameBeamRight = DWVariableRollerSeparation
FrameLength FrameBeamLeft = ConveyorLengthReturn
FrameLength FrameBeamRight = ConveyorLengthReturn
SideRailLength SideRail = ConveyorLengthReturn
LegWidth LegAssembly = ConveyorWidthReturn
UpperLegOffset LegAssembly = DWVariableUpperLegOffset
LowerLegHeight LowerLeg = DWVariableLowerLegHeight
UpperLegHeight UpperLeg = DWVariableUpperLegHeight
HSupportWidth HorizontalSupport = ConveyorWidthReturn
- 2*DWConstantFootToLegOffset
- 4*DWConstantSheetMetalThickness

HSupportWidth –

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 99


Your dimension Rules should now look like this:

Again, don't worry if the Values differ from yours as these will depend on the values
you entered on your Form in Test Mode. You may want to compare the Rule column
above with the rules you have built, however. Your rules may not be in the same order
as the image above.

Custom Properties
There are 4 Custom Properties captured.

Date

DrawnBy

PartNumber

DWColor (a special name that DriveWorks uses to control the color of the model)

79. Change the filter in Model Rules to be Cust to quickly show the Rules for the six
Custom Properties that we captured.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 100


80. Select Date in the list and click Build.

You are going to be driving the Date custom property to be the date on which the files
are created by DriveWorks. You will do this using the Today() function. The date
returned from the Date function will then be formatted using the Text Function.

81. In the Rule Builder, click on the Functions button on the Command Bar.

82. In the filter box on the Function dialog, type TODAY to filter the list to find this
function quickly. Double click on the single entry in the list.

This will add the function Today() to the Rule Editor.

Note

The result at the bottom in the Diagnostics pane shows you the result of this function.

Another Function can now be used to change the format of the date.

83. Highlight the entire Rule in the Rule Editor.

84. Click the Function Button again on the Command Bar and this time filter on the
word Text.

Tip:

All columns will be searched. If you wish to search in one particular column then you
can specify the name of that column (i.e. name:Text). Column names that contain
spaces to separate words should be enclosed within quotes to filter by that column;
"Column Name":Criteria

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 101


85. Select the Function named Text and click OK.

86. In the Format text box type the following.

"dddd dd mmmm yyyy"

Note:

Since this is static text, make sure you use the quote marks at the start and end of the
text.

87. Click Finish on the mini wizard to see the result.

The Rule should now look like this.

88. Click OK on the Rule Builder to confirm the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 102


Tip: Text Function

The Text function can format dates in many ways.

dddd shows the day as a complete word.

ddd shows the first three letters of the day.

dd shows the day as a number.

mmmm shows the month as a complete word.

mmm shows the first three letters of the month.

mm shows the month as a number.

yyyy shows the year using 4 digits.

yy shows the year using 2 digits.

Further formatting can be used between each of the values.

For example "dd:mm:yy" or "mm/dd/yyyy"

89. Select the DrawnBy Custom Property and click Build.

90. Type the word DriveWorks in quotations and the click OK.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 103


91. Select PartNumber in the list and click Build.

The Rule for the Conveyor Part Number will be a text string built up from the three
major dimensions, the Side Rails and the Color. It will include static text and dynamic
values.

The following Rule for the Part Number Custom property will be built by concatenating
dynamic properties such as Form Controls and Variables with Static text. This is
achieved using the syntax shown below:

"Static text" & DynamicValue & " more static text"


The Rule therefore needs to be built as follows:

Note:

Rules can span more than one line. The Rule builder will wrap the text for you as you
type.

The result will be shown in the Diagnostics Pane, along with a list of the Dynamic
properties and their individual results.

The Left function gets a specified number of digits (3 in this case) from the left hand
side of a string.

92. Click OK on the Rule Builder to confirm the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 104


93. Multi-select the Custom Properties for DWColor and click Build.

So far, there are only 2 colors in the list, so an IF statement will allow us to build a Rule
for the Model Color based on either selection.

DriveWorks Pro recognizes the custom property DWColor (and DWColour) and uses
its value to drive the color of the model. The calculated value of the Rule needs to be
in the format "255|126|126" where the numbers represent the RGB (Red, Green, Blue)
color.

The RGB values for the two colors are

Red "255|0|0"

Blue "0|0|255"

94. Use the If Function mini wizard to build the following Rule.

In other words, if the Color selected in the drop down is red, then use "255|0|0" for the
custom property, otherwise use "0|0|255", which is the RGB value for blue.

You should now be ready to create some new models based on your Form and Rules.

95. Click Save in DriveWorks.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 105


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 106
Lesson 4
Lesson 4 Outline
Upon successful completion of this lesson you will be able to:

• Use your forms to specify new Straight Conveyors.

• Generate variations of the 3D models in SOLIDWORKS.

• Use the inbuilt reporting to validate your results.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 107


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 108
Running your Project
You now have everything set up to run your Project and create new models.

There are two ways to create new models in DriveWorks Pro. You can fill out the Form
in DriveWorks Administrator or fill out your Form from inside SOLIDWORKS.

DriveWorks Administrator
To fill out your forms in DriveWorks Administrator, select the Specification Explorer
Task on the Task Explorer and click New on the Command Bar.

Select a Project from the list and click OK to run your Project.

Once the forms are loaded, a set of buttons appear at the bottom of the forms.

Cancel

Cancels the Specification.

Save

Saves the Specification, which can then be edited again later.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 109


Next and Previous

Used to navigate your Forms.

When the Specification reaches the last Form, two further buttons become active.

Finish

This will finish your Specification and add it to a Pending Queue. From here it can be
re-edited or released.

Once you have captured other documents to be driven (i.e. Excel and Word) these will
also be generated at this point.

Release

This will drive captured documents as well as calculate the model data for your new
models based on your Rules, adding the models to be generated to a queue.

Once a Specification has been released, the Models can be generated from the
Command Bar on the DriveWorks Pro Task Pane inside SOLIDWORKS.

Concept: Model Generation

You can fill out your Form many times (or have multiple people filling out Forms) and in
many places and then select to generate them all in one session.

The Specification Explorer shows a list of all Specifications, and the date it was
created as well as its current state (i.e. Saved, Pending, Completed).

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 110


SOLIDWORKS
Forms can be filled in directly in the SOLIDWORKS Task Pane.

Concept: Model Generation Preview

When filling out your Forms in the Task Pane, you can preview your models in
SOLIDWORKS at any time.

In this mode, models can be previewed, the forms changed, and then previewed
again.

Clicking Finish will create the documents (if captured) and add the Specification to the
Specification Explorer List back in DriveWorks Administrator.

Clicking Release in the SOLIDWORKS Task Pane will finalize the models and create
any Drawings that have been captured.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 111


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 112
Lesson 4 Exercise
DriveWorks Administrator.

1. Select the Specification Explorer task from the Task Explorer.

2. Click the New button on the Command Bar.

This will start a new Specification and allow you to fill in your Form.

Note:

If you had multiple Projects in your Group, a dialog would appear allowing you to
select which Project you wanted to run. This is the same dialogue as shown on page
118.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 113


3. Fill out the values that you require in the Form and click Release.

Your Specification will now appear in the Specification Explorer.

4. Select the new Specification in the list and double click on the Specification Report
in the Reports list on the middle right.

Concept: Specification Reports

Every time DriveWorks Pro processes a Specification it creates a report. These reports
will document each part of the process and are a valuable resource when
implementing DriveWorks and validating your process.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 114


The Specification Report details every Rule that the Specification has evaluated now
that the Specification has been released.

5. Switch to SOLIDWORKS (or open it if it is not already open) and close any open
models.

6. Open the DriveWorksTraining Group if it is not already open.

7. Click the Generate Models button on the DriveWorks Pro tab in the
SOLIDWORKS Task Pane.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 115


A dialog will appear that will allow you to select which models you would like to
generate. At this point you can choose to generate only certain models.

If no models appear in the list, it is probably because the Specification has not been
released, in which case go back to the Specification Explorer in DriveWorks
Administrator and select the Specification before clicking Release from the Command
Bar.

Note:

By default, only top level models are shown in the list.

8. Check the box for the StraightConveyorAssembly and click Generate.

The Models will now be generated one at a time, starting at the lowest level of the
assembly and working upwards.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 116


Note:

We have not yet written the Rules to control the Side Rails. These will be in your
Assembly no matter what selections you have made on the Form.

Concept: Model Generation Report

Once DriveWorks has finished generating models, you will be presented with a list of
model generation reports. These show you each stage of the model generation for
each Part and Assembly.

They differ from the Specification Report because it details exactly what was
successful and what was not successful when passing the calculated values to
SOLIDWORKS.

Double clicking on a component in the list will show the values that were used to
generate it. The reports also show any errors that occur (for instance if you try driving
a dimension to a text value rather than a number, these will be shown in the report).
Click Close and then close the DriveWorks Model Generation dialog.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 117


SOLIDWORKS
Forms can be filled in directly in the SOLIDWORKS Task Pane.

9. Click the Run button in DriveWorks Pro.

A dialog Form will appear in SOLIDWORKS with your list of Projects.

10. Select the Straight Conveyor and click OK.

Your Form will appear on the Task Pane Tab, and the buttons on the Command Bar
will change to be appropriate for Specification.

Note:

When filling out your forms in the Task Pane, you can preview your models in
SOLIDWORKS at any time.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 118


11. Change the values on the Form.

12. Click the Preview button on the DriveWorks Pro Command Bar to see your models
being created based on the inputs and the Rules that you created.

A copy of the top level assembly will now open in SOLIDWORKS, and all of the files
will have been given temporary file names.

13. Change the values in your Form and click Preview again to see the updated
model.

Note:

Once the models have been opened initially, the preview will work on the opened file.

14. Click Release to update all of the files with the correct names, and to save them
into the correct folder. At this point it will also create any drawings that have been
captured.

Note:

The files that DriveWorks Pro creates during the previews have temporary file names
and are stored in a temporary folder. Even if you save them, they will be deleted after
you click finish on your Form, as they will already have been saved to the final location
at that point

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 119


Test Mode and Model Insight

15. Run a new Specification within Specification Explorer in DriveWorks Administrator.

16. Click the Test Mode button on the Command Bar.

Concept: Specification Test Mode

Before releasing your models for generation, you can use Test Mode to evaluate what
each Rule is resulting in.

Test Mode is split into multiple tabs to allow you to investigate different sections of
your Project one area at a time.

17. Click the Model Rules tab.

By selecting any component that has been marked for Generation, you can click the
Generate (Queued using Model Insight) button to enter Model Insight. This will allow
you to pause and inspect your Model Generation at any point throughout the process.

Model Insight is a fantastic way to really understand the procedure, step by step, that
DriveWorks takes to automate your Model.

18. Select the Straight Conveyor Assembly component.

19. Click Generate (Queued using Model Insight) on the Command Bar.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 120


Using the Step Into, Step Over and Step Out buttons, you can go through the Model
Generation procedure one action at a time.

Other options include selecting a specific point to pause the Model Generation,
Continuing on Failure, Skip Drawings, Rebuild a Model when the Generation is paused
and automatically rebuild when the generation is paused.

20. Add a break point to the 11th Line of the Model Generation by clicking in the grey
column on the left of the row.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 121


21. Click Run

Watch how SOLIDWORKS will open and begin driving the Roller Frame Beam Left
Part. Also, notice in the Model Insight dialog how it is stepping through each action,
indicating whether it was a success and how long the action took to complete.

The generation will continue on to the Roller Frame Beam Right, then open the Roller
Single Groove part and eventually stop at the line which states ‘Create generation
context’.

22. Click the Step Into button on the Command Bar

This will process just a single action. Continuing to click Step Into will continue to move
the generation on, one line at a time.

Note:

If you are watching SOLIDWORKS whilst stepping through the generation, you will
notice that not much is changing for numerous lines of generation. This is because the
Model will not update until it has been rebuilt.

If you want to see what the model looks like right away, use the Rebuild Model button.

23. Finish off the Generation by clicking Run

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 122


Lesson 5
Lesson 5 Outline
Upon successful completion of this lesson you will be able to:

• Update File Name rules to drive the names of new models.

• Update Relative Path rules to drive the location of new models.

• Use both rules to create Project specific and intelligent file naming.

• Update Configuration and Instance rules to control the Side Rails

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 123


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 124
File Name and Relative Path Rules
DriveWorks Pro creates default File Name Rules, and default Rules for the location of
new files (called the Relative Path rule in DriveWorks).

These Rules can be changed at any time to give more flexibility in the filename and
location of all generated models and drawings.

The default name for both uses the Project name and a unique sequential number,
which is created for each Specification. This value is appended to the end of the
original file name for each model generated.

This combination of the Project name and sequential number is stored in a special
Variable called DWSpecification.

Concept: Special Variable DWSpecification

DWSpecification is a Special Variable used by DriveWorks Pro that is made up of the


Project Name followed by a sequential number that is incremented each time you start
a Specification.

It can either be typed in manually, or added automatically by clicking on the arrow on


the Quick Text button, and selecting:

Special Variables > Specification Name

Note also that because DWSpecification is a Variable it does not need quotes around
it whereas "Suppress" is static text, and therefore does need the quotes.

File Name
This is used to build a Rule for the file name of the new model.

DriveWorks appends the result of the Rule for File Name on to the original filename
with a space in between. So if your captured model is called Block and you have a
File Name Rule that results in a value of 123, then the new file will be called:

Block 123

Relative Path
This is used to build a Rule for the location that the new model will be saved to.

The Relative Path is a file path that will be added onto the Default Specification
Folder, which can be changed in the Settings. So if your Default Specification
Folder is set to be C:\DriveWorks\Projects\Results and your Relative Path Rule
results in a value of Acme\123 then the new file will be placed in a folder called:

C:\DriveWorks\Projects\Results\Acme\123\

Alternatively, you can build a Rule to an absolute path (Local, Mapped Drive or UNC)
and the new model will be placed in that folder.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 125


Configuration
This is used to build a Rule for the configuration model to use, if you wish to switch a
model’s configuration dynamically.

This Property will not create new configurations in Parts and Assemblies. However,
DriveWorks can switch the used configuration based on this Rule, if the Part or
Assembly has more than one configuration. If you do not want to select a configuration
to use based on a Rule, you can leave this Rule blank.

If you require DriveWorks to create a new configuration, you can use a Generation
Task to do this.

Instance
An Instance Rule can be used to drive an instance of a component in an Assembly in
various different ways. They are often used when a part does not need to be captured
and driven (a standard Part such as the Side Rail Mounts in the Roller Frame
Assembly) but does need to be suppressed or have its configuration changed.

To see more examples of what can be driven using Instance rules, please see the
DriveWorks Help File.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 126


Lesson 5 Exercise
First, we are going to add a text box to our Form so that an order number can be typed
in, we will then use that order number to name our files.

Order Number Control

1. Open the DriveWorksTraining Group and Project in DriveWorks Administrator. If


you already have it open and are still running a Specification, click either Cancel or
Finish.

2. Go to the Form Design task in the Task Explorer.

3. Create a new Text box on your Form called OrderNumber.

We are going to use this order number to name files, so we need to make sure that
whatever is entered into the Text Box is valid for a file name. The first validation is to
make sure that something has been entered, i.e. the Order Number Control is not
blank.

We do this by building a Form Message using the Error Result dynamic property.

Concept: Error Result and Form Messages

All controls have an Error Result Property. If a rule is built for this Property which
results in anything but a blank string (“”) a message will be displayed beneath your
Form when running a Specification. This is what is known as a Form Message. If you
are on a Form which has Form Messages, you cannot progress until all Form
Messages are removed (i.e. all Error Result rules are resulting in “”).

The Rule for the Error Result will either need to evaluate to be a meaningful error
message, in which case that text string is used as the Form Message, or it will need to
evaluate to be an empty text string which would mean that the entry is valid.

4. Click in the Error Result property for the Text box on the Property List.

5. Click on the button that appears, which will launch the Rule Builder.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 127


6. Use the If Function Wizard to build the following Rule:

7. Click Finish, but don’t OK your rule.

This If statement means that if nothing is entered in the OrderNumber Text box, the
Form Message "Please enter an Order Number" will be shown when running your
forms. However, if there is a value, then no warning message will be shown (this is
represented by the blank string “”).

Because we are going to be using the Order Number return value in our File Name
rules, we can further enhance the Error result rule by adding the function
IsValidFileName, which will make sure that valid characters are entered for a file
name.

If the Order Number results in an invalid file name, we need to show a warning that
states ‘Illegal characters used in the Order Number’.

Because there are now three potential outcomes to this If statement, we need to nest
an additional If into our Rule.

8. For the second If statement we will type the Rule, instead of using the Function
Wizard

Note:

Nested If functions are created by placing a completed If function, with its three
arguments, inside either or both of the last two arguments of an existing IF function.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 128


9. Place your cursor in the Value If Condition Is False section (refer to image above)
of the statement and remove the blank quotes (””)

10. Type If(

11. Click the Function button on the Rule Builder Command Bar to find the
ISVALIDFILENAME function

12. Enter OrderNumberReturn into the Function Wizard and click Finish

13. Type =FALSE followed by a comma

14. Type “Illegal characters used in the order number” followed by a comma

15. Type “” followed by a closing bracket

16. Check your Rule below as a comparison

The above Rule has had carriage returns and spaces added to make it clearer to read.
While this is not necessary, it does help with readability if you need to re-visit the Rule
later.

You can create a nested IF statement by either typing it into the Rule Editor directly, or
by placing the cursor in the Rule Editor where you would like to insert the second IF
statement and using the IF function Wizard again. The resultant IF statement will be
placed at the location of the cursor in the Rule Editor.

17. Click OK to apply the Rule.

File Name Rules

Now, we can change our Project so that the files created are based on the order
number.

18. Go to Model Rules in the Task Explorer.

19. Click Select All on the Command Bar to select all models and their rules.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 129


20. Type type:file name in the filter box at the top of the Rules List.

This tells DriveWorks to filter based on the Type column.

21. Multi-select all the file name Rules.

Tip:

To multi-select, click to select the first item you require, then Shift click the last Item.
Using Ctrl click allows you to toggle individual selections without losing the existing
selections.

22. Click Build.

You will see the existing Rule in the Rule Editor

For now, we are going to append the value typed in the OrderNumber field on our
Form, onto the end of the original file name.

So if we type QT123 into the OrderNumber field, the new version of this assembly will
be called:

StraightConveyorAssembly QT123

Note - DriveWorks automatically adds the space between the original file name and
the new suffix.

23. Click the Clear button on the Rule Builder Command Bar to clear the Rule Editor.

24. In the Control Browser on the right, double click on OrderNumber.

This creates the Rule OrderNumberReturn.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 130


25. Type & "-" &

This will add a dash between the order number value and the next value of the Rule.

26. Click the arrow below the Quick Text button on the Command Bar and hover over
Special Variables.

Concept: Special Variables

These variables exist automatically in every DriveWorks Project; they allow you to
access certain data from your Project that would not otherwise be accessible. In many
cases throughout your use of DriveWorks you will find yourself using Special Variables
to complete your Rule(s).

27. Click Specification Id

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 131


28. Click OK to save the Rules. The Rules and Values will be updated automatically in
the Rules List. Unless you entered a value for OrderNumber when you created it,
the value will currently be blank.

With the Order Number being used this way, and assuming an OrderNumber of
QT543 is filled out in the Form and the Specification ID is 10, the following assembly
structure would be produced:

There are however, further things we could do at this stage with File Naming. We
could decide not to use the original file name in our new file name, or we could use a
different Rule so that the new file name includes the parameters that drive it..

Let’s create a file name that does not use the original name.

29. Select the StraightConveyorAssembly file name Rule in the list of Rules, with
nothing else selected.

30. Click Build to launch the Rule Builder.

31. Before the text OrderNumberReturn, type in "*" &

32. Click OK to apply the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 132


The Rule should now look like this:

Note:

Having the asterisk ("*") at the start of a file name Rule tells DriveWorks Pro to exclude
the original name when it calculates the new file name.

You can also add an asterisk at the end of the Rule, in addition to the start. This allows
you to prefix the Rule result before the original file name.

Going back to the original example, we would now get the following results based on
entering the order number QT543:

We can now take this one stage further by building up a text string for the new name
for the component Roller End Plate. We are going to base this name on the
parameters that drive the Roller End Plate. This is called Intelligent File Naming.

Concept: Intelligent File Names

DriveWorks Pro will use existing files and create them if they do not exist. With this
knowledge, having the conveyor width and color in the file name means that if
DriveWorks Pro calculates that it has a requirement for the same file, it will not be
recreated.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 133


33. Select the RollerEndPlate file name Rule, with nothing else selected.

34. Click Build to launch the Rule Builder.

35. Click on Clear and then build up a new Rule using the Conveyor Width control
value and the Frame Color control value with a dash between.

The Rule will look like this:

ConveyorWidthReturn & "-" & FrameColorReturn


Now based on a Conveyor Width of 400 and a Frame Color of Red, the new File
Name for a RollEndPlate created by DriveWorks Pro would be:

Relative Path Rules

We will also change the Relative Path Rule for the Roller End Plate to place its files
in a folder called Models\Standards. These folders will be created by DriveWorks in
the Specifications folder when a specification is run.

This means that any models created from the Roller End Plate do not go in a
Specification specific folder enabling them to be used across Specifications as newly
created "Standard" files.

36. Change the filter in Model Rules from file name to type:relative

37. Select only the Rule for the Relative Path of the Roller End Plate.

38. Click Build to open the Rule Builder.

39. Enter the new Rule:

"Models\Standards"

40. Click OK to save the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 134


Note:

The folder structure inside a Relative Path Rule is created using the \ separator.
However, you should not have a \ at the start or end of the Relative Path Rule.

We will now change the Relative Path Rules for all other Models.

For these Models, we would like them to go in a Models folder, but not within the
Standards folder. Within the Models folder we will separate each set of Models into a
Specification specific folder.

41. Multi-select all Relative Path Rules, excluding the Roller End Plate, and click Build

42. Write the following Rule:

"Models\" & DWSpecificationId


Side Rail Instance Rules

Part of the functionality of this Project is that the Side Rails can be controlled in terms
of their height and whether they are included in the Assembly or not.

To do this we will build a Rule that determines the configuration of the Side Rail
Assembly and whether each individual instance is suppressed or unsuppressed. We
must also Suppress or Unsuppress the Side Rail Mount features that were captured in
Lesson 1.

43. Change the filter in Model Rules from type:relative to feat

44. Double click the Side Rail Mounts Feature for RollerFrameBeamRight

45. Select If from the Functions Drop down

This If statement must say, if the side rails control equals Left or it equals None, then
the feature must be Suppressed. If the side rails control equals anything else, it must
be Unsuppressed.

46. Write the following into the three Text boxes of the If wizard:

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 135


Concept: Quick Text

Quick Text provides a ‘clipboard’ which can be used to save bits of rules that you
commonly use. Quick text is saved on your machine so that you can use it across
projects to simplify writing similar rules.

Quick Text also provides access to Special Variables by clicking the drop down at the
bottom.

This Rule will be used elsewhere in this Project, so we will extract it to a Variable

47. Highlight the entire Rule, right click and select Extract Variable

48. Call this Variable SideRailsRight

49. Double click the Side Rail Mounts Feature for RollerFrameBeamLeft

50. Select If from the Functions Drop down

This If statement must say, if the side rails control equals Right or it equals None, then
the feature must be Suppressed. If the side rails control equals anything else, it must
be Unsuppressed.

51. Write the following into the three Text boxes of the If wizard:

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 136


This Rule will be used elsewhere in this Project, so we will extract it to a Variable.

52. Highlight the entire Rule, right click and select Extract Variable

53. Call this Variable SideRailsLeft

54. Change the filter in Model Rules from feat to instance

Note:

SideRailAssembly-1 refers to the left Side Rail

SideRailAssembly-2 refers to the right Side Rail

55. Double click SideRailAssembly-1

Concept: Instance Rules

An instance can be Suppressed, Unsuppressed or Deleted just like a feature.


However, you can also change the configuration of an Instance. To do this, first
provide the Rule with the suppression command and then the configuration name.
These two values must be separated with a Pipe Bar “|”

Firstly, we must tell the instance whether to be Suppressed or Unsuppressed. To do


this, we can simply use the variables previously created.

56. Add the variable SideRailsLeft to the Rule

We must now tell the Instance what configuration to use. The configuration command
must be separated from the suppression command using a Pipe Bar “|”

57. In the Rule Editor type & "|" & DWVariableSideRailHeight

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 137


Your Rule will now look like this:

58. Click OK to confirm the Rule

59. Double click SideRailAssembly-2

60. Add the variable SideRailsRight to the Rule

61. In the Rule Editor type & "|" & DWVariableSideRailHeight

62. Click OK to confirm the Rule

63. Click on the save button on the DriveWorks Pro Command Bar and run a new
Specification either in the Specification Explorer in DriveWorks Administrator, or
using the Task Pane inside SOLIDWORKS. When you click Release, note the file
names, their saved locations and the Side Rails.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 138


Lesson 6
Lesson 6 Outline

Upon successful completion of this lesson you will be able to:

• Manually create tabular data in DriveWorks.

• Use tabular data in your Rules.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 139


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 140
Tables
Concept: Tables

DriveWorks Pro has the ability to either import external tabular data, or to link to it
dynamically. This data could come from Microsoft Excel, txt files or an external
database such as Microsoft Access, Microsoft SQL or other third party applications like
ERP or CRM.

If the data is coming from Microsoft Excel or txt files, then it is imported into
DriveWorks (linking it dynamically would affect performance and your user’s
experience). Database data can either be imported, or dynamically linked.

Databases are accessed via an ODBC connection. Most databases have ODBC
drivers that can normally be downloaded free from the internet.

Using data from external databases does require knowledge of its data structure, as
well as knowing any usernames and passwords required to access the data.

This section will take you through a few different options for importing or linking to
external data.

DriveWorks Pro has a wizard for configuring your external data, which then gives five
options.

Each table requires a name. This name is important when using each table in Rules.
Each table should have a meaningful name.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 141


Simple Table

This option shows a data table, into which data can either be directly typed, or copied
and pasted from tabular data in txt files or spreadsheets.

It is important that this data is in a tabular format, with headers.

The following shows an example of good data.

The following shows an example of bad data.

When copying and pasting data, copy to the clipboard from your chosen application,
then select the top left most cell in the DriveWorks data table before clicking the
Paste button on the Command Bar.

Excel Data Table

This option gives the ability to browse for an external spreadsheet. Once browsed
for, another option is enabled to select the sheet that the data is on.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 142


Again, the data on the selected sheet should be of a tabular nature with headers.

The reason for this will become obvious when we start to reference this table in our
Rules.

The headers are essential when building Rules based on this data.

ODBC Data Table

This option gives the ability to import data from an external data source.

SQL Server Data Table

This option gives the ability to import data directly from a SQL Server database
without requiring an ODBC connection.

Group Tables

Group Tables provide access to tabular data relevant to all Projects within a Group.
The data held in a Group Table can be accessed through all the relevant table
functions in a Rule. For instance, DWVLookup, HLookup, ListAll etc.

Rollup Data Table

A Rollup Data Table is used to retrieve data from any Child Specification Lists within
your Project.

Calculation Table

Calculation Tables allow real time calculations, in tabular Form, to be carried out
during a Specification. Data from Form Controls can be used in the table and results
can be returned to other Form Controls.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 143


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 144
Lesson 6 Exercise
In this exercise, you will increase the color drop down to list many more colors based
on data in a table.

Simple Table

1. Open up DriveWorks Administrator and select the Define Tables task in the Task
Explorer.

2. Click the Add button on the Command Bar to add a new Table to your Project.

3. Select the option for Simple Table.

4. Assign a name for the table. Call it Colors and click Finish.

5. Open up the spreadsheet called Colors.xlsx in Excel (found in the Content folder
within the training files) and copy all of the data from Sheet1 onto the clipboard.

6. Click in cell A1 on the table editor in DriveWorks.

7. Click on the Paste button on the Command Bar or Ctrl and V.

8. Click OK to save the table and complete the process.

The table can now be used to populate the color drop down with all of the values in the
table.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 145


9. Navigate to Form Design using the Task Manager, select the Frame Color
combo box, and use the Rule Builder to update the Rule for the Items.

10. Use the Clear button on the Rule Builder Command Bar to clear the current Rule.

11. In the Rule Builder, click on the arrow below the Functions Button on the
Command Bar. Select ListAll.

The Function Wizard will be shown at the bottom of the Rule Builder with two drop
downs. The first is a list of all the tables you have in your Project, at this stage only
one, once you have made a selection in the first drop down, the second will have the
column headers of that table.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 146


12. Select the name of your table in the first drop down (Colors).

13. Select the Color column in the second drop down.

This tells the function that you want to list all the values in the column with the header
Color, from the Color Table.

Tip:

This is the reason why meaningful header names are important.

14. Click Finish. DriveWorks Pro will build the Rule for you as shown below.

Note:

The actual arguments passed into the function are the name of the table, with a
DWLookup prefix to help DriveWorks Pro identify it as a table, and a number, which is
the column number in the table (the Color column is the 1st column in the table).

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 147


15. In the Help and Diagnostics section at the bottom of the Rule Builder, select the
Values tab.

The result is the same format as the static value that we had before with the pipe bar
(|) as a separator.

i.e. <Value1>|<Value2>|<Value3>| etc.

16. Click OK to apply the Rule and close the Rule Builder.

17. Click on Test Mode in the Form Designer and click your Frame Color Combo Box
to see all the new colors that have been added using the ListAll() Function.

18. Select the Model Rules task in the Task Explorer.

19. Click Select All on the Command Bar and filter for DWColor

20. Multi-select all three properties and click Build on the Command Bar.

Tip

The Rule builder can also be activated by double clicking on any item in the model list,
or single clicking and pressing Ctrl + B.

Rather than directly typing the RGB value for each color, it is easier to perform a
lookup into our table and find the corresponding RGB Value for the color selected in
the Combo box.

21. Click the Clear button on the Rule Builder Command Bar to clear the current Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 148


VLookup Function
The function we are going to use is VLookup. Since this is a common function, you
will find it by clicking on the arrow below the Functions button on the Rule Builder
Command Bar.

There are four arguments of a VLookup:

Lookup This will be the value from the Form that is used for the search

In The table that the data is in

Column The column containing the data to be returned

Match Type True if a nearest match is required, False if an exact match is required

Setting this to True is useful if you have numbers in your first column

Note – The VLookup function always uses the first column as the lookup column.

22. Click VLookup to activate the Function Wizard for the VLookup function.

23. Click in the Lookup text box to give it the focus. Use the Controls List on the right
and double click on the Control Name FrameColor. As usual, this will add the
control name with the Return suffix.

24. In the first combo box, select the table we want to find the value in. At this point,
you will only have one in there. Select Colors.

25. In the second combo box, select the column header that the result will come from.
Select RGB Value.

26. In the Match Type combo box, select Exact Match.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 149


Note:

Nearest match would be used if you had a sequence of numbers, say 1, 2, 3 and 4,
and the value you had to search on was for instance 2.4 in which case the nearest
match is 2.

Selecting Exact Match will then add False to the function for this argument, whereas
selecting Nearest Match will use True.

You should have the results below

27. Click Finish to apply the results from the wizard.

Using this Rule, the value for RGB will be looked up in the table based on the color
selected on the Form.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 150


Lesson 7
Lesson 7 Outline
Upon successful completion of this lesson you will be able to:

• Use Form Templates

• Copy and Paste Controls from one Form to another.

• Use more advanced Form Controls

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 151


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 152
Form Navigation
Concept: Form Navigation

Using Form Navigation, Projects can be set up with multiple forms.

Rules can then be applied to dynamically control the navigation between forms.

Using Form Navigation, the order Forms presented can be set and the decision to
display a Form can be controlled dynamically using rules. The advantage of this is that
Forms can be less cluttered, and not presented to users when they are not required.

Forms Navigation is made up of four types of Node: Forms, Decisions, Start Nodes
and Finish Nodes.

A Project can have as many Forms and Decisions as required, but must always begin
with the Start Node, and end at the Finish Node.

Each Form in a Project appears in the Form Navigation as a separate Node and
Decisions are added to dynamically guide a user to the required Forms.

Form Navigation is achieved by dragging the connection points from one Form or
Decision to another. The connection points are the colored circles that appear on each
Form Navigation Node. For a connected Node, they appear near the entry point to the
next Form or decision for an already connected item.

Decisions have green and red connection points. A Rule is built for each Decision that
must evaluate to True or False. When a Decision Rule evaluates to True, a user will
follow the green connection. When a Decision Rule evaluates to False, the red
connection will be followed.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 153


Form Templates
Concept: Form Templates

Form Templates allow you to quickly create great looking forms from a template.
Templates can create Forms with Controls that are linked to Constants, Variables,
Specification Macros and many more.

There are two main types of Form Templates, Single Form and Multi Form (although
there are multiple variations of the Multi Form Template).

The main functional difference between the Multi Form and the Single Form is that the
Multi Form templates make use of Frame Controls to position and fill content on the
Main Form. The controls created are distributed across multiple forms which makes
them easier to manage. The Single Form Template has all of the controls on one
single form.

All templates that come shipped with DriveWorks are responsive in their height and
their width. This means that the content on the forms will resize based on the available
area.

Multi Form Template – LH Tabs

The image below shows a ‘before and after’ of what your forms will look like at the end of
this lesson.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 154


Static and Dynamic Control Properties
Static Form Properties

Concept: Static and Dynamic Properties

Forms can be enhanced by changing the static properties for each Form Control,
building Rules for the dynamic properties for each Form Control, or by adding different
types of Form Controls.

Each control has its own static property types. Some Control Properties are common
to all controls.

All Controls have size and positional properties. These allow you to position and size
the Form Controls accurately. They also give the ability to set the caption width on
controls that incorporate their own captions.

Static properties are set at the time of designing your Form. They can be made
dynamic by double clicking on the grey orb icon. Fonts and text color can also be
changed to enhance the usability and appearance of your forms.

Labels are a useful addition to a Form, they not only enhance usability, but can also be
used to give text-based feedback to the users.

Static Properties are denoted by a grey icon in the Property List.

Dynamic Form Properties


Each control has its own dynamic property types, and some are common to all.

Dynamic properties can each have a Rule built for them, so that the value can change
depending on other control values.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 155


Typical Dynamic properties include the Items in a ComboBox or ListBox, but also
include the Visible/Enabled state of controls.

Using the Visible and Enabled states and controlling them based on other user
selections ensures that users only need to fill in required data.

Dynamic properties also allow Rules to be used for Minimum and Maximum values of
a Numeric Text Box.

Dynamic Properties are denoted by a green icon in the Property List.

Dynamic Properties can have a static value applied to them.

Advanced Form Controls


DriveWorks Pro has additional Form Controls that add extra functionality to your
DriveWorks Forms.

Depending upon the width of your screen and the size of the Administrator dialog,
these controls are available from the overflow button on the Command Bar while in
Form Design.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 156


Dialog Button

Using Dialog Buttons on your Form allows single forms to be launched as a dialog
Form, rather than as part of the Form navigation sequence.

This then gives the option to display a Form and then return directly to the Form the
button is on.

Dialog Buttons have a Dynamic property for the "Dialog Name".

Using this property, you can build a Rule for the name of the dialog Form that is to be
launched when the button is clicked.

Frame Control

The Frame Control allows a Form to be displayed within another Form. This control is
great for having a clutter free single Form layout.

In the example below the Project is designed to have a flow dictated by the selection
on the left hand side. Depending on what is selected, different controls are displayed in
the main section. To do this without a Frame Control would require many Rules
controlling their visibility. In addition to this, every control would be stacked on top of
each other, making the Form design process difficult.

To resolve this, Frame Controls are used to display information on other forms. One
Form Control can have a dynamic result as to what Form is displayed in the frame,
making the design process much easier and easier to maintain.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 157


Upload Control

The upload control displays a button on the user Form that will launch a browser to
locate and upload a file.

The file can be uploaded to any directory, specified in the Default File Name Property.

Limits to what file can be uploaded (jpg, png, sldasm, etc.) and the maximum size of
that file can also be controlled.

As with other buttons in DriveWorks, pictures can be applied to the Upload Control.

Web Frame Control

The Web Frame control provides a frame that allows external web content (.pdf files
and static web pages) to be rendered into a user Form. When the DriveWorks Form
refreshes, the web browser may reload the web page.

Item List

Item Lists allow you to link a list to a Form. Extended lists can then be created where
each column refers to a control on a Form. In this way, the same Form can be filled out
many times in each Project. Each time it is filled in, a row is added to a list, which can
then be referenced in the same way as a table when building Rules.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 158


Item List controls have a dynamic property that launches a configuration wizard. This
wizard steps through the linking of the list to the Form.

Examples of Item Lists would be if there was a requirement to select an unlimited


number of optional extras on a Project, or if many similar items required specifying.

Any one Item List can be linked to more than one Form. If this is the case, the column
headers in the list itself need to be common for each Form.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 159


3D Preview Box

The 3D Preview Box Form Control allows an interactive 3D model to be displayed on a


Form.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 160


Lesson 7 Exercise
This lesson will transform your current DriveWorks Training Project from one that is
functional to one that is easy to use and looks appealing. We will do this by making
use of the Form templates that come shipped with DriveWorks. The image below
shows what your Form should look like after this lesson.

1. Go to Form Navigation in the Task Explorer

2. Click the arrow below Add Form and choose Add from template

3. Select Multi Form Layout LH Tabs

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 161


Note:

When creating new Forms using a Form Template, a Form Name will need to be
defined. When a Multi Form Template is added, the new Forms that are created will be
named with the entered name suffixed Forms location. For example, the header Form
that will be created by the template will be named ‘<FormName> Header’.

4. Type the name Main into the Text box at the bottom of the dialog and click OK

This will have created seven forms, as well as some additional Constants and
Variables

5. Remove the Details Form from the Form Navigation by clicking the circles
alongside the Form navigation arrows.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 162


6. DO NOT Delete the Details Form! But if you have by accident, click Undo.

Note:

The Details Form includes all the existing Form Controls that you have created. Not
deleting the Details Form will allow these Form Controls to be copied to the new Forms
created using the Template.

Now we will add the Main Form, that was created by the template, into the navigation

7. Drag the blue connection dot from Start to Main

8. Drag the grey connection from Main to Finish

Note:

The Main Form is the only Form that needs to be added to the Form Navigation. It is
made up of several Frame Controls which display the other new Forms.

Now you have finished creating all the new Forms and adjusting the Form Navigations,
you need to make some changes to the Form Design.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 163


Tip:

You can quickly move to the Form Designer from the Form Navigation tab by double
clicking on one of the Forms.

9. Double click the Main Form

Take a moment to navigate from one form to another using the Form Lists on the right
hand side above the Properties section. Take note of what Controls are located on
each Form and how they all look when shown together using Frame Controls on the
Main Form.

Many of the Forms are very simple and have just a few controls on them. However,
they form the basis to what your Form Design will look like by the end of this lesson.
The controls that have been created may not be relevant for our needs; however, they
contain Rules that can be used in the new controls that we create, saving valuable
time.

Main Form

10. On the Main Form select the first tab called Select1 and edit the Text Property

Concept: Hierarchical Properties

It is possible to get the value of another Properties control using a Hierarchical


Property. This uses the ‘.’ notation. In this example we will be using ‘.width’ to get the
width value of the Control.

Instead of the tabs saying Select 1, Select 2 and Select 3, we are going to edit the text
to say Sizes, Options and Pricing.

When the tabs get too small, these words will not fit. Therefore, an If statement is used
to provide an alternative if the tab goes below 85 pixels wide.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 164


11. Change the second section of the If Statement from a blank text string to the
number 1 as a string.

12. Change the text from “Select” to “Sizes”.

13. Remove the rest of the Rule. You will be left with the following Rule:

Note:

ExtractNumber and MyName will be taught in the Advanced Manual.

14. Next, select the second tab called Select2. Edit the Text Property.

15. Edit the Rule to be the following:

16. Now edit the third tab. Build a rule for its Text Property, creating a rule similar to
the 2 previous rules, but using 3 and Pricing.

You will now have three tabs that say Sizes, Options and Pricing.

Main Header Form

17. Select the Main Header Form

There is currently a Picture Box and a Label on this form. These controls resize based
on the width of the Form. We will therefore continue to use these controls and simply
change their values.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 165


18. Select the Picture Box Control and build the Rule for its File Name property

19. Click Clear in the Rule Builder

20. Click the Picture Button on the Command Bar of the Rule Builder

21. Browse for and open the DriveWorksLogo.png image that came in the Training
files Content Folder.

This will place a file path into the Rule Builder. This file path is relative to the location
of the DriveWorks Project file.

22. Select the HeaderRightLabel control and edit its Text Property

23. Type "DriveWorks Conveyors" in the Rule Editor

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 166


Main Right Form

24. Select the Main Right Form

Again, there is a Picture Box and a Label on this form. These controls resize based on
the width and the height of the Form. We have a use for the Picture Box, but we shall
delete the label.

25. Select the Label Control (BodyRightLabel) and delete it.

26. Select the Picture Box Control and build the Rule for its File Name property.

27. Click Clear in the Rule Builder

28. Click the Picture Button on the Command Bar of the Rule Builder

29. Browse for and open the Conveyor.png image that came in the Training files
Content Folder.

30. Click OK to confirm the Rule

The picture currently only takes up a portion of the full area. We will quickly change the
Rules so that it spans the full width and height of the Frame Control it is being
displayed in.

Note:

For more information on Frame Controls read the introduction to this lesson.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 167


31. With the Picture Box selected select the Height Property and build the Rule.

32. Clear the Rule that is there by default.

33. Write the following Rule:

RightFrame.Height - 20

Note:

The above Rule is referencing the result of the Height Property for the Right Frame
control on the Main Form. As the height of that frame control changes, so will the result
of this Rule. This is another example of a Hierarchical Property.

34. Build a Rule for the Width Property of the Picture Box Control

35. Edit the existing Rule to just be RightFrame.Width – 20

36. After each change, go back to the Main Form. Click Test to view the changes.

Main Left 1 Form

We will now move the controls from the Details form onto the forms that are being
displayed below the tabs.

37. Go to Main Left 1 Form

38. Select the Label Control and Edit the Width Property Rule.

39. Highlight the Rule and copy it to your clipboard.

40. Go to the Details Form

41. Press Ctrl and A or box select all of the controls on this Form.

As was explained in the introduction to this lesson, Form Control Properties are either
Static or Dynamic. However, this can be changed for each control.

A static property is a single value that does not change. It is represented by a grey dot.

A dynamic property is a Rule that can change; it is represented by a green dot.

A static property can be changed to a dynamic property by double clicking the grey
dot.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 168


42. Double click the grey orb next to the Width Property.

43. Build a Rule for the Width Property

44. Paste the Rule from your clipboard into the Rule Editor, change -10 to -20, and
Click OK

The Width of all of the selected controls will now be the correct width for the Frame
Control where they will be displayed.

45. Multi-select the Order Number, Conveyor Length, Conveyor Width and
Conveyor Height.

46. Cut and Paste them from the Details form to the Main Left 1 form.

47. Change the Left Property for all of these controls to be 10.

48. Delete the label called BodyLeftLabel1

We will now change the appearance of the Slider Controls so that they have a custom
image for the slider thumb image.

49. Multi-select all three Slider Controls.

50. Select the Thumb Image Property and build a Rule for this Property.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 169


Concept: Custom Sliders

Sliders can be customized in terms of the slider image and the color of the track. Doing
this can take you away from a standard Windows style slider, to something that ties in
with your brand and the design of your configurator.

51. Click the Picture Button on the Command Bar of the Rule Builder and browse for
the Slider-Grey.png image in the Content folder.

52. Click Open and click OK in the Rule Builder.

53. You can also change the Track Color if you would like.

Main Left 2 Form

54. Go to the Details form.

55. Select the three remaining controls (Frame Color, Side Rails and Elevated Side
Rails).

56. Cut and paste them on to the Main Left 2 form.

57. Position them to the top left of the Form.

58. Delete the label called BodyLeftLabel2

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 170


59. On the same form (Main Left 2) create two new Option Button Controls called
RollerBed and BeltBed

Instead of these two controls looking like Option Buttons, we will change the
appearance of the control so that they are clickable images. There are various
Properties we must change to do this.

Picture – The image file to show when the Option Button is not selected.

Picture (Selected) – The image file to show when the Option Button is selected.

Picture Style – Determines whether just a picture, text and a picture, or just text is
shown.

Show Option – Determines whether the default Option Button indicator is shown.

Picture Size Mode – Controls how the image is shown in the Option Button Control

60. Select the Roller Bed Option Button Control.

61. Select the Picture Property and click the Rule Builder button.

62. Browse for the image called RollerBed.png. This is within the BedType folder in
the content folder that was shipped with the training material.

63. Open this file.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 171


64. Select the Picture (Selected) Property and click the Rule Builder button.

65. Browse for the image called RollerBedSelected.png. This is in the BedType folder
within the content folder that was shipped with the training material.

You should now have something that looks like the image below. You now need to set
the Picture properties for the BeltBed Control.

66. Select the BeltBed Control and set the Picture and Picture (Selected) properties
using the BeltBed.png and BeltBedSelected.png files.

Now we must change some of the other properties of the controls so that the images
display how we want them.

67. Select both Option Button Controls. (RollerBed and BeltBed)

68. Change the Picture Style Property to be Picture.

69. Change the Show Option Property to be False.

70. Change the Picture Size Mode to Zoom.

71. Resize the controls so they look something like the image below:

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 172


72. Click the Test button on the command bar to test these newly designed buttons

You can also apply similar settings to a check box.

73. Change the appearance properties of the Elevated Side Rails Check Box so that it
also represents a clickable image. The images you require are in the same Content
Folder. Hint: When the Check Box is checked, the Side Rail are Elevated.

74. Create a Label Control called BedType like in the image above.

75. Finally, write a Rule for the Elevated Side Rails Check box so that it is only visible
when required. You will need to write a Rule for the Visible Property. The result of
the Rule should be False if “None” is selected in the Side Rails Combo box. The
result should be True if anything else is selected. Hint: In the Visible Property,
TRUE means the Control will be visible, FALSE will hide the Control

76. Test out you Form to see the effects your changes have made.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 173


Main Footer Form

77. Go to the Main Footer form and expand its node in the tree so you can view what
Controls are on it.

78. Select the Footer Right Label. Change the Text Property so that it says "Price = "

Note:

This label will be edited in Lesson 10 when a price is determined for the product.

For the left label, we will display the Part Number as it is being created. As we have
already created a Rule for the Part Number we will repurpose it for this label. This
requires extracting a variable from the Rule created in Lesson 3.

79. Go to Model Rules and remove any filters that have been previously applied. Click
Deselect All from the Command Bar.

80. Check the check box next to Straight Conveyor Assembly, ensure that all other
models are unchecked.

81. Launch the Rule Builder for the PartNumber Custom Property.

82. Highlight the entire Rule, then right click and select Extract Variable.

83. Name the Variable PartNumber and click OK to confirm the Rule.

84. Return back to Form Design and go to Main Footer

85. Edit the Footer Left Label. Launch the Rule Builder for the Text Property.

86. In the Rule Builder, select the Variables tab on the right-hand side and double click
the Part Number Variable.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 174


This Variable is slightly out of date since it was created. This is because we have
added controls that determine the type of conveyor bed. We will now update this
Variable.

87. Right click the Variable in the Rule Editor and select Edit Variable

In addition to the Rule that already exists we are going to use the LEFT() function to
return the first 4 letters of the selection made on the BedType Option Buttons.
Therefore, the returned value will be either Roll or Belt.

88. At the end of the Rule type & "." &


89. Next, click the Functions button and filter for the function called Left.

90. Select the function and click OK.

91. In the wizard, place your cursor in the Value Text box.

92. Go to the Controls tab and double click the BeltBed Control. This will add
BeltBedReturn to the Value Text box.

Note:

The RollerBed and BeltBed Option Button return value will be either RollerBed or
BeltBed depending on which one is selected. You could have used RollerBedReturn in
this rule and achieved the same result.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 175


Next, you must determine the number of characters from the left that need to be
returned from the BeltBedReturn value.

93. Type 4 into the Number of Characters Text box.

94. Click Finish. OK both the Variable Rule and the Rule for the Text Property.

Main Left 3 Form

This form will be edited in more detail in Lesson 10 when we configure the pricing for
the conveyor. For now, we will just delete the label that currently exists on this form.

95. Go to the Main Left 3 Form and delete the label named BodyLeftLabel3.

Finally, now that we have removed all of the controls from the Details form, this can be
deleted as it is no longer required.

96. Go to Form Navigation in the Task Explorer.

97. Select the Details form and click Delete on the Command Bar

Test out your new forms by running through a few Specifications in the Specification
Explorer and the SOLIDWORKS Task Pane. Note how the forms look different when
running them via the SOLIDWORKS Task Pane. This is mainly down to the
Hierarchical Properties that are being used in the Form Template.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 176


Lesson 8
Lesson 8 Outline
Upon successful completion of this lesson you will be able to:

• Add more component sets to your Project.

• Swap these component sets for existing models.

• Drive these component sets based on Rules.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 177


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 178
Dynamic Replacement Files
DriveWorks Pro allows you to replace either Parts or Sub-Assemblies in your top level
Assemblies for other captured Parts or Assemblies. This means that you do not have
to overload you master models with suppressed replacement models, speeding up
generation time, and simplifying your models.

Concept: Driving Replaced Files.

DriveWorks Pro also allows us to control the dimensions and features of the
replacement file once it has been swapped in.

An example of this is shown in the pictures below, where two different rear door types
exist. One can be swapped for the other, and once swapped, driven to be the correct
size.

This is achieved by first capturing the model to be replaced and driven in DriveWorks
Pro, and then by using the model Rules to indicate that a replacement is required.

The model is captured in the Group, and then attached to the Project before building a
file name Rule for the model that is to be replaced.

Concept: Component Sets

DriveWorks Pro allows you to have as many Component Sets as you want within a
Project (a component set is a top level Assembly or Part). You can then choose, based
on Rules, whether to create none, one, many or all of your component sets whenever
you fill out your forms.

You can also use any component set as a replacement for any model within your main
assembly

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 179


The order that these appear in the Model Rules Tree is important, especially if you
want to swap one of the top level Component Sets into another one.

Models will be calculated (Released) by DriveWorks Pro in the order that they appear
in the tree. Therefore, any replacement models must be created (and have their rules
evaluated) before the model they are being replaced into. They can be ordered in the
tree using the Move Up/Move Down buttons on the Command Bar.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 180


Lesson 8 Exercise
This exercise will cover capturing the Belt Bed, and then updating the Rules to ensure
that this model is replaced and driven as required.

1. Open SOLIDWORKS and switch to the DriveWorks Pro Task Pane.

2. Open the DriveWorksTraining Group, if it is not already open.

3. Close any open models.

Capturing Additional Components

4. At the top of the DriveWorks task pane there will be a helper link that states
Open a model to capture it. Click this link

5. Browse for the model BeltFrameAssembly.SLDASM (this model is found within


Models\Frame\BeltFrame in the files shipped with the training.)

6. Open this model.

7. Rebuild and Save the model.

8. Click on the help link to capture the current model.

Tip:

Remember that if you have changed the name of a feature or dimension from the
original name that SOLIDWORKS assigns, then DriveWorks Pro will recognize that,
and use the changed name.

We must now capture the components that need driving for this assembly. They are
very similar to the components that required capturing and driving for the Roller Frame
Assembly.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 181


9. Check the check boxes alongside the following components to capture them.

Component Capture
Belt Frame Assembly Yes
Belt Frame Beam Left Yes
Belt Frame Beam Right Yes
Belt Roller Yes
Belt Roller Yes
Belt Rubber Band No
Belt End Plate Yes
Bracket No
Side Rail Assembly Yes
Rail Upright No
Side Rail Support No
Support Collar No
Support Rod No
Side Rail Yes
Belt Yes

Capture Belt Frame Beam Left

10. Open the Belt Frame Beam Left component from the Captured Models Tab.

11. Capture the dimension that determines its length within the Base-Flange2 feature.
Use the default name that is populated in the Name Text box.

12. Select the SideRailMounts Feature and capture this in DriveWorks with the
default name.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 182


13. Finally capture the DWColor Custom Property so that the part color can be
controlled.

Capture Belt Frame Beam Right

14. Open the Belt Frame Beam Right component from the Captured Models Tab.

15. Capture the length dimension FrameLength@Sketch6 and use the default name,
Frame Length.

16. Select the SideRailMounts Feature and capture this in DriveWorks with the
default name.

17. Finally, capture the DWColor Custom Property so that the part color can be
controlled.

Capture Belt Roller Part

18. Open the Belt Roller Part (Not the Belt Roller Assembly).

19. Double click the End Plane and capture the dimension 428. Use the default name.

Capture Belt End Plate

20. Open the Belt End Plate from the Captured Models tab.

21. Capture the dimension that determines the width EndPlateWidth@Sketch1. Its
value is 428. Use the default name provided when capturing.

22. Capture the DWColor Custom Property.

23. Capture DXF as an Additional File Format. Capture it With Rules.

Note: As the Side Rail part is a shared component between the Roller Frame and the
Belt Frame, there is no need to capture the length dimension. DriveWorks already
knows that this has been captured.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 183


Capture Belt

24. Open the Belt Part from the Captured Models tab.

25. Double click Boss-Extrude1 and capture the dimensions that determine the length
and the width of the belt.

26. Capture D1@Boss-Extrude1 as BeltWidth

27. Capture BeltLength@Sketch1 as BeltLength

Capture Belt Frame Assembly

28. Open the Belt Frame Assembly.

29. Double click the Width plane and capture the dimension associated to it. Use the
default name provided.

30. Capture the two Side Rail Assemblies as Instances by checking the check box
alongside them after selecting the Instances tab.

31. Click Save on the DriveWorks Pro Task Pane within SOLIDWORKS.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 184


Build Rules for Replacement Components

32. Open DriveWorks Administrator and log into the DriveWorksTraining Group.

33. Open the StraightConveyor Project and go to Model Rules.

34. Click Add on the Command Bar.

35. Check the check box alongside BeltFrameAssembly and click OK.

You will now have two Component sets in your Model Rules.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 185


36. Click Select All on the Command Bar and filter for dimensions.

37. Multi-select BeltBedWidth, RollerWidth, EndPlateWidth, BeltWidth and


RollerBedWidth.

Concept: Duplicating Rules

In the step above you have selected four blank Rules and one Rule that has already
been created. When you click the Rule Builder, DriveWorks will display the Rule that
has been created for RollerBedWidth. However, because you are building the same
Rule for all five selected items, when you click OK, that Rule will be applied to all
selected Rules.

38. Click Build

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 186


39. Click OK in the Rule Builder

40. There are two blank instances of Frame Length. Multi-select both of them as
well as an instance of Frame Length that already has a Rule.

41. Also add to this multi-selection by selecting SideRailLength and click Build.

42. Click OK in the Rule Builder

43. Finally, double click BeltLength and write the following Rule:

44. Click OK in the Rule Builder.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 187


45. Change the filter from dimension to feat

46. Copy and paste the Rule from RollerFrameBeamLeft to BeltFrameBeamLeft

47. Copy and paste the Rule from RollerFrameBeamRight to BeltFrameBeamRight

48. Change the filter from feat to Instance

49. Copy and paste the Rule from SideRailAssembly-1 to SideRailAssembly-1

50. Copy and paste the Rule from SideRailAssembly-2 to SideRailAssembly-2

Now that the BeltFrameAssembly Rules have been created so that it can be driven,
you need to write the Rules to allow it to be replaced with the RollerFrameAssembly
when required.

51. Deselect All and remove the filter that you have in your Model Rules.

52. Check the check box alongside BeltFrameAssembly and double click the File
Name Rule.

53. Click Clear in the Rule Builder.

54. Click the Functions drop down button and select If to open the function wizard.

55. Fill out the function wizard as below:

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 188


This Rule will ensure that a file name is provided to the Belt Frame Assembly if
required, and if not, it will mark it for deletion.

56. Click Finish in the function Wizard.

57. Click OK in the Rule Builder.

58. Deselect the BeltFrameAssembly and check the check box alongside
RollerFrameAssembly.

59. Double click the File Name Rule to begin editing it.

60. Launch the If function wizard.

61. Like with the Belt Frame Assembly, in the Condition Text box type
BeltBedReturn = "BeltBed"

Concept: Replacement Component

To replace one component for another a certain syntax is required. This can be
automatically created by double clicking the component that you require to be replaced
into the assembly. This can be done on the right-hand side of the Rule Builder.

62. Place your cursor in the Value If Condition is True Text box.

63. Browse to the Components tab in the Rule Builder and double click the
BeltFrameAssembly component.

Finally, we can reuse the Rule that is still existing in the Rule Editor for the final part of
the If Statement.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 189


64. Cut and paste the entire Rule currently in the Rule Editor into the Value If
Condition is False Text box.

65. Click Finish in the function wizard. You will now have the Rule below:

66. Click OK to confirm the Rule.

67. Click Select All and filter for DWColor.

68. Multi-select all of the DWColor properties and click Build.

69. Click OK in the Rule Builder to confirm that the Rule will be duplicated to all
Properties.

The final two sets of Rules to complete are the Relative Path Rules and the File Name
Rules for the newly captured components.

70. Change the filter from DWColor to Type:File name

Tip:

Click on the Rule Column header to sort by that column.

71. Select one Rule that uses OrderNumberReturn & "-" & DWSpecificationId

72. In addition, multi-select all of the Rules that still use DWSpecification for their Rule.

73. Click Build.

74. Click OK in the Rule Builder.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 190


Tip:

Make sure that the first Rule selected is the one you would like to duplicate.

If Rules exist in all of the selected properties, the first one selected is the one that is
used.

75. Change the filter from type:File to type:rel

76. Select one Rule that uses "Models\" & DWSpecificationId

77. In addition, multi-select all of the Rules that still use DWSpecification for their Rule.

78. Click Build.

79. Click OK in the Rule Builder.

80. Finally, save and test your Project by running a new Specification and Generating
the Models.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 191


Concept: Model Preview within SOLIDWORKS

Whilst running your Specification within SOLIDWORKS, instead of completely


generating the Model with the final file names, you can preview the model generation.
When running your Specification in SOLIDWORKS and after filling out the details you
require, click the Preview button before clicking Release or Finish.

Doing this will generate your models without closing the Specification. It is great for
quickly testing additional functionality that you have added to your Project without
having to create many different specifications.

Tip:

If you do not get the results you expect, make sure you look in the Release Reports
and Model Generation Reports.

Try adding some of the other controls to your Form, such as Dynamic Labels. These
are handy when giving onscreen instructions. Building the dynamic Caption Property
based on a Rule allows you to give the instruction required dynamically.

Don’t forget about using Model Insight for Troubleshooting any issues.

Concept: Model Insight

Model Insight is launched from Specification Test Mode and provides an essential tool
for understanding how a model is generated by DriveWorks. Model Insight uses the
Queued method of model generation.

With Model Insight you can:

See the exact order in which dimensions, features, advanced features, custom
properties, etc. are processed

See the time it takes to execute each operation

See where a particular operation may be failing

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 192


Lesson 9
Lesson 9 Outline
Successful completion of this lesson provides you with:

• An introduction to DriveWorks Data Management.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 193


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 194
Data Management
In this section, we will take a deeper look at DriveWorks Data Management.

To open DriveWorks Data Management, search for it in the Windows Start Menu.

1. Open DriveWorks Data Management, Double click your Group, check the check
box to confirm your data is backed up and click Log-on.

Tip:

This check box must be checked to ensure that you have acknowledged that there is a
backup of your data. Without checking this, DriveWorks Data Management will not let
you log in.

DriveWorks Data Management provides you with the ability to delete all your
DriveWorks Group and Project Data. Anything done within Data Management is a
permanent change to the Group

Once you are logged in, additional tasks will appear in the Task Explorer.

DriveWorks Tasks
On this tab, you can import Projects, Specifications and Components into the current
Group. Each of these three buttons will take you through a wizard that will assist you in
adding these items to your Group.

This is great for merging Projects into one Group or simply bringing captured
components from one Group to another.

You can also Copy a Group into another Group, great for transferring data from a
development group to a production Group, and perform a Pack and Go to back up or
distribute your Project to another location.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 195


Captured Information
The Captured Information tab allows you to re-reference the location where
DriveWorks is looking for a captured Model or Drawing. This is vital if you have moved
files from one location to another, renamed a folder or renamed a file.

You can re-reference individual items one at a time, or relocate an entire folder to a
different location to remap where DriveWorks is looking for multiple files.

Tip:

If DriveWorks is unable to find a file, it will be highlighted in red. If there is a mixture of


files that can be found and ones that cannot, it is often best to click the Missing Files
Only button to allow you to quickly select only the files that need attention.

It is also possible to delete a reference all together. This will completely remove the
captured model (and all its captured design parameters such as Dimensions and
Custom Properties) from the Group, so be careful!

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 196


Projects
The Projects tab has very similar functionality to the Captured Information tab;
however, instead of Captured Models and Drawings, it deals with the location of the
Projects in your Group.

Just like in Captured Information, you can right click on an individual file (Project) or
you can relocate an entire folder structure.

Specification Information
Within the Specification Information tab will be a list of every Specification that has
been created and transitioned in the current Group.

Just like with Captured Information and Projects, you can relocate where DriveWorks
thinks a Specification is stored or the entire folder where it is looking.

The list of files shown here will be the Documents and the Specification files
(.drivespec) that have been created by each Specification.

If old Specification data is important to you, you can Import Specifications from other
Groups. This is important for moving from development to production to ensure that no
historical Specifications are lost.

Note:

You cannot import Specifications into a Group that currently contains Specifications.
The existing Specifications must first be deleted and the Specification ID reset.

On the Command Bar of this tab is a button that says Reset Specification Id Pool. As
the name suggests, this allows you to reset the count for the Special Variable
DWSpecificationID. This Special Variable is used throughout DriveWorks and in the
default file name Rules.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 197


Released Files
The Released Files tab is a view into the database of files that DriveWorks has
created.

Next to each item is a colored circle that indicates whether a released file has been
generated (green circle), whether it is waiting to be generated (blue circle) or whether
its generation failed (red circle).

Tip:

If you are using Intelligent File Names (as taught for the Roller End Plate) and there is
an error with the Model DriveWorks created, you can use the Released Files tab to
delete the file that was created. Otherwise, DriveWorks will continue to use the file that
was created incorrectly.

Again, like with the three previous tabs, you can relocate an individual released file
and an entire folder.

Released Master Files


Similar to how the Released Files tab shows the files that have been created by
DriveWorks, the Released Master Files tab shows the reference to where the Master
Files were when the Specification was run, like a snapshot in time.

The data shown in the list will likely be similar to the data shown in the Captured
Models tab. However, the Captured Models tab shows the current reference to where
the Master Models are stored. Whereas Released Master Models shows the reference
to where the captured information was at the time of Releasing a Model for generation.

If a Specification has been transitioned and Models have been released, but they are
yet to be generated, moving the master files will result in a failed Model Generation. In
this scenario, you can use DriveWorks Data Management to re-reference where the
Master Files are located.

This can be done just like in the previous tabs, by right clicking an individual file or by
relocating an entire folder.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 198


Lesson 10
Lesson 10 Outline
Upon successful completion of this lesson you will be able to:

• Create a Quotation Document using the Quote template.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 199


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 200
Documents
Concept: Documents

DriveWorks Pro can create documents automatically based on Rules. There are 2
categories of Document, Files and Data Documents.

Documents - Files

These documents are based on master documents, much like the SOLIDWORKS data
we have been driving in the previous lessons. Documents-Files documents are used to
create a new version of the master document each time it is released.

There are also several template documents which we will be using in this lesson to
create a Quote.

Documents – Data

These documents do not create a physical file but are used to create data. An example
of this would be exporting data to a Database in Microsoft SQL, or a DriveWorks
Simple Table.

In this lesson we will be focusing on Documents – Files, however the document types
in Documents – Data are covered in the DriveWorks Pro Advanced Manual.

Each document requires a name, and will also have a file name Rule, and path Rule
as well as the Rules for the data or text to be driven into the document.

Concept: Document File Name and Relative Path

As with models, documents require a File Name Rule and a Relative Path Rule. Again,
as with models, default rules are created for you when you first create the document.
You can change them to your desired location if required.

Documents then have values that can be driven based on Rules.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 201


Export Form
The Export Form document type will create an image (.png) of a specified
user Form as it appears at the point the export is triggered.

XML Templates
DriveWorks uses ID Tags in the template to allow data to be driven into them.

Tags will be of the following format.

Each of the ID entries will have a Rule built for them that will replace the text within the
tag.

These XML documents can also include transforms that will format the XML as a
document.

XML can also be used to pass data to other company systems.

Microsoft Excel Files


Any Microsoft Excel document can be used as a template for new documents.

Excel has the ability to name cells. Once named, these cells can have Rules created
for each one to allow data to be passed from DriveWorks Pro to your new document.

Cells are named in Excel by selecting any cell, and typing a name in the drop down in
the top left corner of Microsoft Excel.

Cell names cannot have spaces and most non-alphanumeric characters are not
allowed. They should not start with a number.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 202


After you have typed the new name, make sure you hit the Enter key to apply the
name.

To check your names, use the Name Manager inside Excel. This will also allow you to
change the cell that a name references.

Named ranges are specific to an Excel document and not to a particular sheet.
DriveWorks allows you to drive values into any named cell on any sheet.

Microsoft Word Files


Any Microsoft Word document can be used as a template for new documents.

In Word, you can highlight any text in a document, and create a bookmark around it.

Bookmarks can also be created in-between characters.

DriveWorks then drives text into the position of the bookmark based on Rules. If the
bookmark spans words or characters, then these will be replaced with the result of the
Rule.

Select a part of your text in a template document, and go to Insert>Bookmark in


Microsoft Word to bring up a dialog. Again, Bookmark Names cannot have spaces in
them.

Bookmarks and other formatting symbols can be shown/hidden in Microsoft Word at


any time.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 203


Copied Files
DriveWorks Pro gives the ability to copy an existing file into a new folder with a new
name, each time the forms are filled in.

This could be useful, for example, if there is a need to copy specific data sheets into a
contact folder based on user selections, or if you need to copy picture files that would
be referenced by XML transform documents.

The only Rules that are built for copied documents are the new file name, and its path.

Referenced Files
Referenced files are simply a way of only showing specific documents to users, rather
than all documents created. An example of this would be if you have Distributors for
your products who access DriveWorks over the web using DriveWorks Live. In this
case, you might only want them to have access to a General Arrangement Drawing
and a Quote, and not an automatically created BOM or detailed Component Drawings.

The only Rule to build for a Referenced file is the complete file name.

Emails
DriveWorks Pro can send emails automatically, based on Rules.

When configuring an email in DriveWorks, Rules are built for sender and recipient
email addresses, the cc and bcc fields, as well as the Subject and Message Body.

Rules are also built for any attachments that are to be sent with the email.

If attachments are being created by DriveWorks, the emails will be held in a queue
until those attachments have been created.

Emails can only be sent by DriveWorks Autopilot, a separate DriveWorks Pro module
that is purchased separately.

When building a Rule for the Message Body, text is directly typed in the message
editor, and then tags (<< >>) applied for each area that require Rule driven data.

Double clicking on the blue text launches the Rule Builder.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 204


Document Templates
DriveWorks Pro is shipped with some template documents. One example of this is a
Quotation. The quotation is based on XML and creates a HTML document.

The templates also create Variables where required, making it easier to build your
Rules.

The templates are based on XML, but also have a transform file and images
associated with them, so that the XML is presented as a document in a browser.

The HTML document can be opened up in any browser, and saved as a single file,
which would include the images.

DriveWorks 3D File
The DriveWorks 3D File document type references a .drive3d file, which has been
exported from SOLIDWORKS.

The DriveWorks 3D File document is used to manipulate .drive3d files. It can be used
to change the appearance of the .drive3d file as well as swapping .drive3d files out for
other .drive3d files.

There is also the possibility to scale, rotate and translate models in 3D space, allowing
you to manipulate models instead of using replacements. This allows for a quicker 3D
experience, especially in a browser, as you do not need to wait for replacement
models to uploaded to the client’s machine. Scaling, rotation and translation of models
is all done client side, on the user’s machine.

There are also many other features of 3D documents that you can take advantage of,
such as On Click Macros, Scene Lighting and Panning.

If you want to learn more about the 3D capabilities of DriveWorks, check out the
Webinar Library in the DriveWorks Community.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 205


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 206
Lesson 10 Exercise
Driving an XML Template Document

1. Open DriveWorks Administrator, and make sure that the Straight Conveyor Project
is open.

2. Click on the Documents - Files task in the Task Explorer.

3. Click the Add button on the Command Bar to add a document to your Project.

4. Select the Quote Document template and give the document a name. Use
Quotation.

5. Click Finish to add the document to your Project.

The Document View will switch automatically to edit the details of the document. Here
you can build Rules to drive the document.

Note:

As with models, documents require a File Name Rule and a Relative Path Rule. Again,
as with models, these have been created for you, although you can change them if
required.

Documents then have other values that can be driven based on Rules.

6. Click the Preview button on the Command Bar. This will open the document in a
Browser.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 207


Notice that there are default values in the document. These are all driven from
Variables. The easiest way of updating these values is to update the Variables that
drive them.

7. Activate Variables by clicking on the Define Variables task on the Task Explorer.

You will see two new Variable Categories added to your Project, one called Common
and one with the same name as your document. These Variables are all used within
the Quotation Document that you just created.

8. Click on the Common Category in the Category Tree.

The Variable List will show the Variables in this Category.

In the Common Category you will see Variables for things like Company Name,
Company Address (3 lines), Quote Number as well as some dates, and a Customer
Contact and Address.

9. Select the CompanyName Variable.

10. With the Variable selected, click Build.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 208


11. Change the default text to be your Company Name and, as it is static text, use
quotes.

12. Change the StrapLine Variable.

Another Variable Category has been created with the same name as your document
(Quotation). If you drill down into this category in the category tree, there is a sub
category called Line Items, which itself contains a Category for 50 line items. Each of
these sub categories has 4 Variables for Quantity, Description, Discount and Unit
Price.

If you build any of the Rules for these Variables, they will automatically be updated in
the document.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 209


13. Drill down into the Category Tree, expand Quotation, then Line Items and finally
Line Item 1.

14. Build a Rule for the Description of Line Item 1 using Variable
QuotationItemDesc1.

The Rule will build up text using static text and dynamic text based on your Form
selections.

Tip:

Use the Values and Steps helpers at the bottom of the Rule Builder to assist you in
getting the syntax correct.

15. Next, build a Rule for the Line Item 1 Unit Price using the Variable
QuotationItemUnitPrice1. Clear the existing rule.

The Rule we build will take into account the dimensions selected for the conveyor
length, width and height. Each of these dimensions affect the total price in a different
way to account for the added complexity of the size increasing.

Do not use a currency symbol in this Rule; just use numbers. The currency symbol is
also a Variable, allowing you to change it based on Rules and is itself passed through
to the document from that Variable.

We are also going to format the result to always show two decimal places using the
text function.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 210


16. Start by multiplying the ConveyorLength by a factor of 0.02. Surround this
calculation in parentheses.

17. Next, multiply the ConveyorWidth by a factor of 0.004. Surround this calculation in
parentheses and multiply it by the Conveyor length calculation.

18. Next, multiply the ConveyorHeight by a factor of 0.005. Surround this calculation
in parentheses and multiply it with the rest of the calculation.

19. Click Finish to add the text from the wizard into the Rule Editor.

20. Click OK to apply the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 211


Note:

The Quote Document Template uses a transform file (.xslt) to format currency values
to two decimal places.

This means that when the result of the rule, being passed into the Quote, is 96 for
example, it will be displayed as 96.00 (or 96,00 for comma separated environments).

Therefor currency rules being passed into the Quote document require no further
formatting.

21. Change the QuotationItemQty1 to be a static value of 1.

22. Change the Description for Line Item 2 to show text based on the Bed Type
selected on the Form by building a Rule for the Variable QuotationItemDesc2 as
below.

We will now change the QuotationItemUnitPrice2 so that it changes dynamically based


on the bed type selected.

To do this, we will take a factor of the ConveyorWidth and a factor of the


ConveyorLength and multiply it by a factor of the BedType that has been selected.

23. Start by creating the following Rule for the QuotationItemUnitPrice2

24. Type *

25. Click the Functions button and launch the If Function wizard.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 212


26. Fill out the wizard with the following information:

27. Click Finish. Your Rule will now look like this:

28. Change QuotationItemQty2 to be a static value of 1.

29. Create the following Rule for QuotationItemDesc3

This Rule will either display a blank value if None is selected or a description on the
type of Side Rail selected if one is selected.

Note:

The Quotation template is designed so that if a Description value is blank, that row will
not be displayed in the document.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 213


30. Change the value for the QuotationItemQty3 to be 1

31. Build a Rule for the QuotationItemUnitPrice3

32. Click the Functions button on the Command Bar on the Rule Builder and select the
If function Wizard.

33. Fill out the Wizard as below:

This If Statement will apply a price for the Side Rails if both sides are selected, then
apply half that price if only one side is selected.

Next, we need to account for if no Side Rails are selected.

34. Click Finish in the Rule Builder

35. Select the If Function Wizard again.

36. Type the following in the Condition text box:

SideRailsReturn = "None"

37. Type 0 in the next text box.

This means that if None is selected, then a price of zero will be applied.

38. Cut and paste the Rule from the Rule Editor into the Value If Condition Is False
text box.

39. Click Finish in the function Wizard, and then click OK in the Rules builder.

40. Select the Documents-Files task on the Task Explorer and preview your document.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 214


41. Select the Documents-Files task on the Task Explorer and preview your document.

Note:

Your Document Preview may look different and have different values based on the
selections you have made on your Form.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 215


Reusing Variables on a Form

42. Go to the Form Design and select the Main Left 3 form.

43. Create six Label Controls with the Text Properties and the Names as in the Table
below:

Type Name Text Property Rule


Label SizeLabel =DWVariableQuotationItemDesc1
Label BedLabel =DWVariableQuotationItemDesc2
Label RailLabel =DWVariableQuotationItemDesc3
Label SizePrice =Text(DWVariableQuotationItemUnitPrice1,”0.00”)
Label BedPrice = Text(DWVariableQuotationItemUnitPrice2,”0.00”)
Label RailPrice = Text(DWVariableQuotationItemUnitPrice3,”0.00”)

Note:

The UnitPrice Variables, used in the Quotation, did not require formatting to two
decimal places as the document transform handled this.

Now these values are being displayed on the Form, we need to add formatting using
the Text() function.

Resize your labels so that your Form looks like this:

44. Create another Label called TotalPrice.

This Rule will sum the Price Variables from the Quotation document. It will use the
Text function to format this to two decimal places. Finally, it will prefix this total price
calculation with a currency symbol.

45. Build a Rule for the Text Property of this Label.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 216


46. Type Sum(

47. Add the QuotationItemUnitPrice1, QuotationItemUnitPrice2 and


QuotationItemUnitPrice3 each separated by a comma.

48. Close this function with a closing bracket.

49. Your Rule will now look like this:

50. Next, format this Rule to two decimal places using the Text Function.

Let’s Extract this Rule to a Variable called TotalPrice

51. Highlight this entire Rule and Extract it to a Variable called TotalPrice.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 217


Finally, at the beginning of this Rule we must add a Currency symbol. Luckily there is
already a currency Variable that was created by the Quotation Document.

52. At the beginning of the Rule, add the Variable DWVariableCurrencySymbol,


followed by an ampersand (&).

The final Rule will now look like this:

53. Click OK to confirm the Rule.

54. Finally, use the new Total Price and the CurrencySymbol Variable for the
FooterRightLabel Text Property on the Main Footer Form.

Your Form will now look like this:

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 218


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 219
Lesson 11
Lesson 11 Outline
Upon successful completion of this lesson you will be able to:

• Capture a SOLIDWORKS Drawing in DriveWorks.

• Drive the Drawing based on Rules.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 220


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 221
Drawings
Concept: Drawings

As well as creating new drawings for parts and assemblies, based on master
drawings, DriveWorks Pro can also control the detail on the drawing.

Drawings are captured using the DriveWorks Pro Task Pane inside SOLIDWORKS.

Drawing Rules are also built in the Model Rules section of DriveWorks Pro
Administrator to control the captured parameters when a new drawing is created.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 222


DriveWorks Pro controls the following parameters in a Drawing:

Drawing Sheets
DriveWorks Pro can control the scale of each sheet in a drawing based on Rules.
Sheet state Rules also allow for sheet renaming and deletion.

Drawing Views
The scale of Drawing Views and their position on the sheet can also be controlled
based on Rules. Drawing View state Rules also allow for view deletions, as well as
giving the ability to control the model configuration in the view.

Dimension and Annotation Positions


Dimensions and annotations on each view can have their positions controlled relative
to that view. The positions are not driven using Rules, rather they are captured to
always place them the same relative distance from the Left, Top, Right or Bottom of
the view as they are in the master drawing.

Breaklines
Controlling breaklines in views (including multiple breaklines per view) is included in
DriveWorks Pro. This is in case it is not possible to dimension up a breakline in a view
relative to dimensionally controlled geometry.

Breaklines are controlled as distances from the left and right of the view (top and
bottom in the case of horizontal breaklines)

Annotation Text
Any annotation can have its text updated based on Rules. This also includes driving all
of the detail in a weld symbol or geometric tolerance.

The Rule for the annotation text can also be used to delete the annotation using the
special word "Delete".

Custom Properties
As well as controlling part and assembly custom properties, DriveWorks Pro can also
control the values in drawing custom properties based on Rules.

Layers
Layers can be hidden and shown based on Rules. This is particularly useful if a lot of
drawing information needs to be hidden or shown at once.

File Formats
Like Parts and Assemblies, DriveWorks can create additional file formats from your
drawings, such as PDFs, edrawing files and DXFs.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 223


Lesson 11 Exercise
We can improve the Drawings that we have already captured, by controlling sheet
scale, view positions, Annotation text and much more.

This section covers the capturing and driving of drawing parameters.

Capture Straight Conveyor Drawing


Capturing Drawing Detail

1. Inside SOLIDWORKS, and with the DriveWorksTraining Group open, activate the
Captured Models section by clicking on its section header in the capture explorer. If
you have no models open in SOLIDWORKS, this will be the only section.

To begin with, the SOLIDWORKS Drawing must be captured against the component
that it uses.

2. Double click on the Straight Conveyor Assembly, which has already been
captured.

3. Click on the Drawings tab and click Browse.

4. Browse for the file named StraightConveyorAssembly.SLDDRW and click Open.

This Drawing has now been captured against the open Assembly.

5. Double click on the Drawing that you have captured to open it.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 224


6. Rebuild and Save the drawing to update it to the latest version.

Once the drawing has opened, the Capture Explorer will change to be specific to
capturing drawings with different sections to parts and assemblies.

Capture Sheets and Views

The first section is Sheets and Views, which is used to capture the sheets and views
that you wish to control.

Note:

If you capture a Sheet, you will be able to control its scale based on Rules, as well as
its state. Sheet state allows you to Delete a sheet, or rename it based on Rules.

If you capture a View, you will be able to control its position on the sheet, its state
(which controls the Configuration to show, and gives the ability to delete it) and its
scale, providing its scale is not linked to the sheet or its parent view.

7. Check the Sheet and the View for this Drawing.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 225


Notice that an image appears at the top of the Capture Explorer showing the layout of
the sheet. If you select a View in the tree, it will be highlighted in green in the layout
picture.

You can also resize any of the panes in the Capture Explorer by dragging.

Information is also displayed about the current size and position of views and sheets,
as well as the Captured information that will be driven based on your Rules.

Capture Annotation Text

8. Activate the Annotation Text section by clicking on its section header.

Concept: Annotation Text

Capturing Annotation Text allows you to drive text on your Drawing based on Rules.
As with model dimensions, we capture Annotation Text by selecting it in the Drawing,
and assigning a meaningful name to it in DriveWorks Pro.

9. Select the Note, which currently reads Order Number: 123-123.

10. In the DriveWorks Pro Task Pane, enter a meaningful Name. Use OrderNumber.

11. Click Add to capture the Annotation Text.

12. Select the Note, which currently reads Total Price $1234.

13. In the DriveWorks Pro Task Pane, enter a meaningful Name. Use TotalPrice.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 226


14. Click Add to capture the Annotation Text.

Capturing Layers

DriveWorks Pro allows you to control the visibility of Layers on your Drawing.

15. Activate the Layers section by clicking on its header in the Capture Explorer.

The list will then show the current Layers in your Drawing.

To Capture a Layer, check it in the list. For the purposes of this training we are going
to capture the Layer Notes. The annotations OrderNumber and TotalPrice are the only
items on this layer. Using a Rule a layer can be shown or hidden, therefore hiding or
showing these annotations.

16. Check the layer Notes in the list.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 227


Capturing Custom Properties

DriveWorks Pro allows you to control Drawing Custom Properties so that you can drive
their text based on Rules.

17. Activate the Custom Properties section by clicking on its section header.

The Custom Properties Section will show you all of the Custom Properties that are
currently in your Drawing.

In this particular Drawing, the Custom Property PartNo is linked to the PARTNUMBER
field in the Drawings border.

18. Check the PartNo custom property to capture it.

19. Also capture the Date and Description Custom Properties.

Note:

As with Model Custom Properties, you can add new Custom Properties to your
Drawing by typing in a new Custom Property Name and clicking Create.

Capturing File Formats

DriveWorks Pro allows you to export your driven drawing to different file formats.

20. Activate the File Formats section by clicking on its header.

21. Capture PDF as an additional file format. Select With Rules from the drop down in
the Captured column

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 228


Concept: Capture With Rules

The With Rules capture option will allow you to specify additional parameters for each
file format.

22. Click Save on the DriveWorks Pro Task Pane.

Capture Roller Frame Drawing

23. Open the Roller Frame Assembly from the Captured Models tab

24. Select the Drawings tab and browse for the RollerFrameAssembly.SLDDRW and
open it.

25. Double click on the newly captured Drawing to open it.

Capture Sheets and Views

26. Check the check box alongside Sheet1, Drawing View1 and Drawing View2

Capture Annotation Positions

You can also capture View Dimensions in the section, to enable you to control the text
to the left, top, right and bottom. Information on the Rules required to do this can be
found in the Help file.

27. Activate the Annotation Positions section by clicking on its section header.

Concept: Annotation Positions

When you capture annotation positions around a view, they are placed back in the
same relative position to their location during capture.

You can link the positions to the top or bottom and then either the left or the right.

28. In the Capture Explorer, on the Annotation Positions section, select Drawing View1
in the tree or click on the view in the layout picture.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 229


The selected view will be highlighted in green in the preview, and the view will be
selected in SOLIDWORKS. If the Drawing is not showing the correct sheet, then this
will be activated automatically.

29. In SOLIDWORKS, draw a fence around the balloons on top of the view.

This will highlight the dimensions and balloons in SOLIDWORKS.

30. Check the Top and the Left Check box.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 230


31. Click Apply.

The selected dimensions will be added to the tree. Without the need for Rules, these
dimensions will be placed back in these relative positions when a new drawing is
created, regardless of the size of the new model and view.

Tip:

When drawing the fence in SOLIDWORKS, if you draw from top-left to bottom-right, it
selects everything that is inside the fence. If you select from bottom-right to top-left, it
selects everything that is inside the fence AND everything that crosses the fence.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 231


If you move any dimensions around on the sheet after capture, simply click the Update
Positions button.

You can also deselect Captured annotations, by selecting them in SOLIDWORKS, and
checking the appropriate position check box until it is the state you require.

32. Capture the Annotation Positions for Drawing View2. There are two dimensions
that need to be Captured to the Top and to the Right.

Capture Custom Properties

33. Activate the Custom Properties tab.

34. Capture Date, Description and PartNo

Capture Additional File Formats

35. Activate the File Formats tab.

36. Capture PDF With Rules

37. Click Save in the DriveWorks task pane.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 232


Capture Belt Frame Drawing
This drawing is a copy of the Roller Frame Assembly Drawing. We will be repeating
the same steps to capture the necessary information on this drawing.

38. Open the Belt Frame Assembly from the Captured Models Tab.

39. Select the Drawings Tab and Browse for the BeltFrameAssembly.SLDDRW and
Open it.

40. Double click on the newly captured Drawing to open it.

Capture Sheets and Views

41. Check the check box alongside Sheet1, Drawing View1 and Drawing View2

Capture Annotation Positions

42. Activate the Annotation Positions section by clicking on its section header.

43. In the Capture Explorer, on the Annotation Positions section, select Drawing View1
in the tree or click on the view in the layout picture.

The selected view will be highlighted in green in the preview, and the view will be
selected in SOLIDWORKS. If the Drawing is not showing the correct sheet, then this
will be activated automatically.

44. In SOLIDWORKS, draw a fence around the balloons on top of the view.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 233


This will highlight the dimensions and balloons in SOLIDWORKS to the left of the view.

45. Check the Top and the Left Check box.

46. Click Apply.

47. Capture the Annotation Positions for Drawing View2. There are two dimensions
that need to be Captured to the Top and to the Right.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 234


Capture Custom Properties

48. Activate the Custom Properties tab

49. Capture Date, Description and PartNo

Capture Additional File Formats

50. Activate the File Formats tab.

51. Capture PDF With Rules

52. Click Save, to save the Captured information to the DriveWorksTraining Group.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 235


Adding Form Controls

1. Open DriveWorks Pro Administrator and make sure that the StraightConveyor
Project is open.

Tip:

To Launch DriveWorks Administrator click the button on the DriveWorks tab.

2. Go to Main Left 1 in the Form Designer.

3. Create three check box controls called CreateDXF, CreatePDF,


ShowDrawingNotes

Note:

DriveWorks automatically adds spaces between Capitalized letters in the Control


Name. You can edit the Caption Property to remove these spaces if required.

Building Rules for the Drawing


The captured information in the drawing can now have Rules built to control the
values.

4. Go to Model Rules. Click Refresh from the Command Bar.

Note:

If you have any filters applied, make sure you remove them.

The Tree shows the captured models. Drill down to the appropriate model to see its
drawing.

Note:

Any additional properties captured for drawings, parts and assemblies require the
Refresh button in the Command Bar to be clicked before they will show up.

5. Select all three drawings that have just been captured. Drawings have a different
icon to the parts and assemblies.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 236


The Rules for this drawing now appear in the Rules list, and the preview and
information will show at the bottom, depending on which sheet/view you select.

The bottom section is for information only; it will allow you to see which view you are
working on using the preview, and to see the current information about each sheet and
view.

Notice that Rules have automatically been created for the File Name and Relative Path
just as they were for Parts and Assemblies.

File Name Rules

6. Multi-select the File Name Rules for the Roller and the Belt Frame Assembly
Drawings.

Tip:

The Rule for these file names will be the same as the Rule for the majority of File
Names created for the Models. Why not copy and paste the Rule from there to speed
up this process.

7. Click Build and build the Rule below:

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 237


8. Confirm this Rule and next, build a Rule for the File Name of the Straight Conveyor
Assembly Drawing.

9. This Rule will be the same as the File Name Rule for the Top Level Model. You
could copy and paste this Rule to save time.

Relative Path Rules

10. Multi-select the three Relative Path Rules and build the following Rule:

This Rule will ensure that the Drawings are placed in a different folder to the Models,
however within this Drawings folder, the Drawings will be separated into Specification
specific folders.

Custom Property Rules


Custom Properties are controlled by building a Rule that will result in a text string.

11. Select the PartNo Rules in the Model Rules List.

12. Click Build.

This Rule will simply use the Part Number Variable that was created earlier in the
Training.

13. Build a Rule that references the PartNumber Variable.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 238


14. Click OK to confirm the Rule.

15. Select the Date Custom Properties and click Build.

16. Create a Rule that references the Variable called Created.

17. Click OK to confirm the Rule.

18. Select the Description Custom Properties and click Build.

This Rule will make use of the three description Rules that were created for the
Quotation, however it will combine them into one Description.

19. Browse to QuotationItemDesc1 in the Variables tab within the Rule Builder.

20. Double click the Variable to add it to the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 239


21. Write the following text string: & " with a " &

22. Now add the Variable QuotationItemDesc2 to the Rule followed by an ampersand
(&)

We will now use the If Function to determine whether the word and is required.

23. Either use the Function Wizard or type the following If statement:
If(SideRailsReturn = "None", "", " and ")

Note:

Note that the text strings that are written sometimes include spaces at the start and/or
the end of the string. This is because without them, the sentence would be
grammatically incorrect and there would be no space between that word and the result
of the Variable.

24. Finally type an ampersand (&) followed by the Variable QuotationItemDesc3.

Your Rule will now look like this.

25. With the Rule created, extract it to a Variable called Description.

Tip:

Refer to a previous lesson that walks through the process of extracting a Variable if
you need assistance.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 240


Layer Rules
Next, a Rule for the captured Layer will be created. A check box was created earlier in
this lesson for the purpose of this Layer Rule. If the check box is checked, the layer
must be visible. If the check box is not checked, it will be hidden.

26. Select the Rule for the Notes layer and click Build.

27. Build an If statement Rule so that if the ShowDrawingNotes check box is


checked, then the Layer will be visible, and if not, it will be hidden.

Note:

The command to make a Layer visible is “Show”

The command to make a Layer not visible is “Hide”

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 241


Annotation Text Rules
Annotation Text is controlled by building a Rule that will be calculated to be a text
string.

28. Select the OrderNumber Rule in the Model Rules List.

29. Click Build.

30. Build the following Rule

31. Select the Total Price Rule in the Model Rules List.

32. Click Build.

33. Build the following Rule

Note:

Having an Annotation Text Rule that results in the word "Delete" will delete the
Annotation from the drawing.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 242


Sheet Rules

34. Click Deselect All on the Command Bar in Model Rules.

35. Expand the Straight Conveyor Assembly Drawing and check the check box
alongside Sheet1.

Concept: Drawing View Positions

When a drawing is rescaled, the views can be moved to new locations. Building these
Rules ensures that the views are positioned exactly where we want them.

These Rules will control the Top Left position of each view measured in the Drawing
Units from the bottom left hand corner of the sheet.

You can drive your view positions to be exactly where you want them, although in this
case, we are going to build Rules to position them back to their original locations.

Tip:

The original locations can be found by clicking on each view in turn in the bottom panel
of the Model Rules List and noting the Top and Left positions in the Information Panel.

36. Write a Rule for the Sheet1-DrawingView1-View Top Position.

37. Set this Rule to be a static value of 287.

38. Write a Rule for the Sheet1-DrawingView1-View Left Position.

39. Set this Rule to be a static value of 9.

Concept: Drawing Scale

DriveWorks Pro allows you to build a Rule for both the Scale Numerator and the Scale
Denominator. If the Numerator is greater than the Denominator, then the scale will be
greater than 1:1 and vice versa.

It is normal practice to set one of these values to a static value of 1.

40. Write a Rule for the Sheet1-Scale Numerator.

41. Set this Rule to be a static value of 1.

The next Rule to build is the Denominator Rule. To help break this Rule up and make it
easier to understand, we will create it in sections using Variables.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 243


42. Create a new Variable called AverageDimensions

43. The Rule for this Variable will be:

(ConveyorLengthReturn+ConveyorWidthReturn
+ConveyorHeightReturn)/3

44. Create another new Variable called AverageMasterDimensions

45. The Rule for this Variable will be:

(1500+882+528)/3

Tip: You could create a new ‘Drawing’ Variable Category to organize these Variables

We now need to calculate the scale Denominator. The dimensions that influence the
required scale of the sheet are the Conveyor Height, Conveyor Width and
Conveyor Length.

Calculating the Scale

We will use a simple Rule, calculated from the basis that:

New Scale = New Average Sizes

Master File Scale Master File Sizes

Transposed for the New Scale, we get:

New Scale = ( New Average Sizes / Master File Sizes) * Master File Scale

Then to make sure that we only get a whole number, we can add the roundup function
with an argument of Zero decimal places.

New Scale =
ROUNDUP( ( New Average Sizes / Master File Sizes) * Master File Scale , 0 )

Transferring this calculation into the DriveWorks Training Project the Rule will be:

New Average Sizes = DWVariableAverageDimensions

Master File Sizes = DWVariableAverageMasterDimensions

Master File Scale = 10

Therefore:

DWVariableAverageDimensions / DWVariableAverageMasterDimensions) * 10

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 244


Tip:

This will possibly result in a non-standard sheet scale. If you want to use standard
sheet scales, create a table of allowable sheet denominators, then use the VLOOKUP
function to find the nearest value, both looking up in, and returning from, the first
column.

46. Go back to Model Rules and build a Rule for the Sheet1-Scale Denominator

47. Following the calculations above, the Rule will now be:

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 245


Using Generation Tasks to Scale a Drawing
For the two Frame Assembly Drawings, we will use the Drawing Generation Tasks
specifically designed to scale a Drawing View.

Concept: Generation Tasks

Generation Tasks allow additional automation tasks to be run on Models and


Drawings. They allow you to have much more control over the specific tasks carried
out by DriveWorks during the generation of a SOLIDWORKS Model and Drawing.

Concept: Rescale and Position View Generation Task

This specific Generation task allows you to determine an area in which a


SOLIDWORKS Model can fit. You simply provide the task with four measurements for
the maximum right, maximum top, minimum left and minimum bottom. The Generation
Task will then scale the Drawing View to its maximum size before the view exceeds
these limits. You can also specify scales to use as a ‘best match’. The Generation
Task will choose the nearest specified scale which is less that the maximum scale
possible.

48. Go to Generation Tasks in the Task Explorer.

49. Select the BeltFrameAssembly Drawing.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 246


50. On the right-hand side is a Toolbox of tasks that can be added to the Standard
DriveWorks generation sequence.

51. Drag the Rescale And Position View task from the Toolbox into the Pre Drive
Tasks box.

Concept: Pre Drive Tasks

Within Generation Tasks, on the middle of the view is the Generation Sequence.
Without the Pre Drive and the Post Drive boxes, the list of items in this Generation
Sequence area is exactly the tasks that DriveWorks performs every time it runs a
Model Generation.

Generation Tasks can be added to the Pre Drive and to the Post Drive areas to
customize the Generation Sequence to your needs.

A good example of when it is important to choose the correct Task box, would be if you
were using the Create Image Generation Task. Chances are you would want the
image to be of the new model, so you would need to add it to the Post Drive Tasks
box, so that DriveWorks has finished driving the model before the image is created.

Every Generation Task has several properties that determine how that Task
specifically functions.

For the Rescale and Position View task you must define the View Name to control and
the area in which that view can be located. Optionally we can also specify a list of
scales for the Generation Task to choose from.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 247


52. Write the following values into the Properties for the Rescale and Position View
Task

Property Name Rule


(Name) Rescale And Position Belt View 1
View Name =”Drawing View1”
Maximum Right 235
Maximum Top 182
Minimum Bottom 45
Minimum Left 14

53. Drag a second Rescale and Position View Task in the Pre Drive area.

54. Write the following values into the Properties for the Rescale and Position View
Task:

Property Name Rule


(Name) Rescale And Position Belt View 2
View Name =”Drawing View2”
Maximum Right 405
Maximum Top 280
Minimum Bottom 200
Minimum Left 14

Every time this Drawing is generated, they will now be scaled to fit within the area that
has been defined.

Next, we will add the same tasks for the Roller Frame Assembly Drawing.

Note: Because the Tasks are the same, except on different drawings you could simply
copy and paste the two Generation Tasks, and change their (name) Property

55. Select the RollerFrameAssembly Drawing

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 248


56. Drag the Rescale And Position View task from the Toolbox into the Pre Drive
Tasks box.

57. Write the following values into the Properties for the Rescale and Position View
Task:

Property Name Rule


(Name) Rescale And Position Roller View 1
View Name =”Drawing View1”
Maximum Right 235
Maximum Top 182
Minimum Bottom 45
Minimum Left 14

58. Drag a second Rescale and Position View Task in the Pre Drive area.

59. Write the following values into the Properties for the Rescale and Position View
Task:

Property Name Rule


(Name) Rescale And Position Roller View 2
View Name =”Drawing View2”
Maximum Right 405
Maximum Top 280
Minimum Bottom 200
Minimum Left 14

The final feature to add to these Drawings is the ability to choose when a PDF and a
DXF are created.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 249


60. Go to Model Rules and click Select All on the Command Bar.

61. Filter for PDF.

62. Multi-select and build the following Rule for the three File Name Rules:

Note:

When an Additional File Format is captured, the file will be created unless the word
“Delete” is the result of the File Name.

If the Rule results in a blank string “”, it will be given the same name as the Model or
Drawing it has been captured against.

This is similar for the Relative Path. If the Rule is left blank, it will be saved in the same
location as the Model or Drawing.

63. Click OK to confirm the Rule.

64. Filter for DXF.

Note:

These DXFs were captured in Lesson 1 and Lesson 8 against the End Plate part for
the Belt Bed Assembly and the Roller Bed Assembly.

65. Multi-select and build the following Rule for the two File Name Rules:

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 250


66. Click OK to confirm your Rule.

67. Save your Project and run it to test out the new drawing functionality.

Note:

In order for your Generation Task to run, you will need to create the Specification from
Administrator (releasing the models), then go into SOLIDWORKS and create the
Model and Drawings using the Model Generation cube. This is because Generation
Tasks will not be run when a Specification is created and the models are released via
the SOLIDWORKS Task Pane. This is because of the differences between On-
Demand and Queued Model Generation methods. You can read more about the
different methods of generation in the DriveWorks Help File.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 251


Lesson 12
Lesson 12 Outline
Upon successful completion of this lesson you will be able to:

• Create a simple Specification Flow

• Add tasks to run on States and Transitions

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 252


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 253
Specification Flow
By default, when a user gets to the last Form of a Specification, there are two main
options, Finish and Release. When Finish is clicked, documents are normally created,
and the Specification is marked as "Pending". When Release is clicked, models are
calculated and released to the generation queue. The Specification is then marked as
being "Completed".

What determines all of this is known as Specification Flow.

There are several different States in the default flow, and three different State Types.

State Types

Running

Forms are displayed and information can be entered into the Controls

The only default Running State is called Specify.

Paused

The forms are not displayed, the default Paused States are:

Saved

Pending

Completed

Automatic

This State type will be processed by DriveWorks Autopilot

The default Automatic State is Released To Server.

When in each State, there are a number of actions that can be taken, which will move
the Specification from one State to another.

For instance, when in the Pending State, the Specification can be Deleted, Edited,
Copied or Released.

This is best explained by showing the default Specification Flow in graphical Form.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 254


DriveWorks Pro offers the ability to change this Specification Flow to suit the needs of
an organization. Quite often it is much easier to clear the default flow and create your
own from scratch, creating States and Transitions which fit your companies workflow.

Each State can have Operations, Transitions and all States have an Enter and Leave
Event.

Operations

An example of an operation on a State is the ability to Copy or Delete it.

By default, each of the Paused and Automatic States has these operations.

Operations can have conditions and user permissions attached to them.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 255


Transitions

The Transitions dictate which State can be transitioned into any other State.

An example of this is that the Specify (Running) State can be Transitioned into a
Saved (Paused) State by clicking a Save button.

Transitions can have conditions and user permissions attached to them.

Events

Events allow Tasks to occur on the exit and entry into any State.

An example of an event task could be to increment the revision number of a


Specification, or delete a file or folder upon entry to the State.

Specification Flow Templates

You can create your own completely custom Specification Flow, or you can begin by
using one of the templates that comes shipped with DriveWorks Pro.

You can also create templates from your own custom Specification Flows. This is great
for reusing a Specification Flow in another Project.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 256


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 257
Lesson 12 Exercise
We will be changing the Specification Flow for the StraightConveyor Project.

We will change the flow to be simpler, containing just three States: Specify, Completed
and Saved.

Using Default Specification Flow

Currently, when you run your Project, at the end of filling out the specification
information, there are a few options.

These options are Transitions. Clicking each one will move your Specification to a
State in the Specification Flow.

Using a Modified Specification Flow

By the end of this exercise you will have a simpler Specification Flow and the options
at the bottom of your form (the Transitions) will be:

1. With the StraightConveyor Project open, select the Specification Flow task in the
Task Explorer.

This will show the default Specification Flow shipped with DriveWorks Pro
Administrator.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 258


2. Click Customize Specification on the Command Bar to enable the default
Specification to be edited.

3. Click Clear

We are going to start with a blank Specification Flow so that we can simply make the
functionality that we want available.

4. Click Add State and enter the name Specify

By Default, the first State added to an empty Specification Flow will be a Running
State, which is also the Initial State. You can identify the Initial State of a Specification
Flow as it will say Initial in the bottom right corner.

Concept: Automatic, Paused, Running and Initial States

Automatic States
An Automatic State indicates the Specification is controlled by DriveWorks Autopilot

Paused
A Paused State indicates the Specification is held in a queue, available for selection
from the Specification Explorer

Running
A Running State indicates that the user forms will be loaded into the Specification
window or browser for the users to enter data onto

Initial State
The Initial State is the first state entered when a Specification is first created. Your
Initial State must therefore be a Running State

You can change a States type by right clicking it and selecting which type of State you
need it to be.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 259


5. Click Add State again and create a second State, name it Completed

6. Click Add State again and create a third State, name it Saved

Now that we have three States we can create a method of moving from one state to
another. This method is called a Transition.

7. Select the Specify State, a blue dotted line surrounding the State will indicate it
has been selected

8. Click Add Transition and provide the name Generate

The next step is to identify where the Transition will transition to.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 260


9. Click and drag the Generate Transition from the Specify State to the Completed
State.

10. Click the Completed State to select it.

11. Click Add Transition and provide the name Edit

12. Click and drag the Edit Transition from the Completed State to the Specify State.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 261


13. Click the Specify State to select it.

14. Click Add Transition and provide the name Save

15. Click and drag the Save Transition from the Specify State to the Saved State.

16. Click the Saved State to select it.

17. Click Add Transition and provide the name Edit

18. Click and drag the Edit Transition from the Saved State to the Specify State.

Your final Specification Flow will look like this:

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 262


With the flow created, we can now assign tasks to Transitions, Operations and the
point of Entering and Leaving a State. Tasks can perform functionality such as driving
values into Controls and Constants; Releasing Models, Documents and Emails; plus
much more. All available Tasks can be seen in the Toolbox within the State Editor, as
seen below:

These Tasks are the same as the Tasks available from the Specifications Macros
section.

For this Project we need to add just two tasks to the Enter State event of the
Completed State.

19. Click edit on the Completed State

20. Select the Enter State event

21. Type Release into the filter of the Toolbox

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 263


22. Double click Release Document(s)

Concept: Release Documents Task

The Release Document Task is used to send a Document for generation. You can use
the Task to generate different documents at different points in your Specification Flow.

23. In the properties grid, in the Documents property, select Quotation

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 264


24. Double click Release Model(s)

Concept: Release Models Task

This Task works in a similar way to the Release Document Task. It is used to release a
model into the Model Generation Queue.

25. In the properties grid, in the Models property type an asterisk (*)

Note:

The asterisk indicates that all items in that property will be actioned. In the case of the
Release Models task, all of the models in the Project will be released for creation. In
the case of Release Documents it indicates that all Documents in the Project will be
released for creation.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 265


26. Select Edit Transition from within the same dialog.

27. Type Rev into the filter for the toolbox.

28. Double click Increment Revision Number

This task will run when the Edit Transition is clicked

29. Click OK to close the window.

30. Click Edit. on the Saved State.

31. Select the Edit Transition.

32. Type rev into the filter of the Toolbox.

33. Double click Increment Revision Number.

34. Click OK to save your changes.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 266


Note:

The task that we have just added (Increment Revision Number) increments the
Revision Number Special Variable in DriveWorks. We will now edit our Project to make
use of this Revision Number in the File Names.

Tip:

To reposition the transition arrows that connect the states, left click and hold down the
mouse button on any of the little black blocks .The rectangle will turn into a black
square that can now be dragged around the perimeter of the state.

Edit File Name rules

35. Go to Model Rules and edit the File Name Rule for StraightConveyorAssembly.

Note:

If you have a filter in place, remove this so that you can view the File Name Rule.

36. Double click DWSpecificationId

37. Right click and select Replace In Rules

38. In the dialog that appears, edit the Replacement Rule by adding
&”-“& DWRevisionNumber to the Rule.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 267


Tip:

Don’t forget that as you start typing RevisionNumber, Rules Insight will predict that this
is the variable you require. Press enter when it’s selected to complete the Rule.

39. Click Find Rules.

This lists all of the locations throughout the Project that uses DWSpecificationID.

40. Ensure that only File Name Rules are checked.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 268


Note:

There is one rule called Specification Name that is shown in the list. Make sure this is
Unchecked.

41. Click OK. The Rule will now be updated to include the Revision Number. Check
through your Project, notice that DWSpecification has been updated for all File
Names.

Run through your Project a few times to test out the new Specification Flow that you have
just created. Notice that when you click Save, the Models and Document will not be
released, due to the necessary Tasks not being added to the Save State.

Note:

From this point in the manual, you will always need to use the blue Model Generation
cube in the SOLIDWORKS Task Pane to generate your models. Nothing will be
generated automatically if you only create the Specification from the SOLIDWORKS
Task Pane.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 269


Lesson 13
Lesson 13 Outline
Upon successful completion of this lesson you will be able to:

• Create a Macro Button on your Form

• Create a Specification Macro to run using your Macro Button

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 270


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 271
What is a Macro?
A Macro is a saved set of tasks that can then be run using a single command. You can
create macros in SOLIDWORKS, to perform a series of tasks that can then be run
automatically by simply executing the Macro, saving you time.

In DriveWorks, Macros can be created to perform a number of useful tasks and can be
set to run on the click of a button. These DriveWorks macros are called Specification
Macros. Specifications can also be run at various other points in a DriveWorks
Project, but for this training we will be focusing on Macro Buttons.

Specification Macros
Specification Macros allow you to easily create a macro that runs any number of tasks
you choose.

Specification Tasks can be added to the macro from the Toolbox. With a Macro
selected simply drag and drop tasks (or double click the name of the Task) into the
central task pane to add them to the Macro. You will end up with something like this:

Specification Tasks
Each one of the square blocks above is a Node. A Node can be either a Specification
Task or a Specification Condition. Each Specification Task has its own properties to
determine exactly what it does. An example of a Specification Task would be:

• Invoke Specification Transition


• Cancel Specification
• Copy File
• Delete File

One Specification Macro can run any number of tasks to achieve the result you
require. It can even run other Macros and run other Macros in a loop.

As an example, this section of the manual will show you how to create a button on
your form, that when pressed will create a snapshot of the form at that time

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 272


Macro Buttons
A Macro Button is a Control that can be added to any of your DriveWorks Forms.

When the button is clicked, you can run a Specification Macro that you have created in
your Project.

The Specification Tasks, contained within the Macro you have set the button to run,
will then be executed. You determine which Specification Macro is run via the Macro
Buttons Properties.

Macro Control Properties


A Macro button has some standard Control properties that you will recognise from
other controls you have already added, such as Font, Visible, Tab index etc.

However, there are a few Properties that are unique to Macro Buttons and are
particularly important.

With a Macro Button on your Form, the most important Control Property is the Macro
Name. This property must be linked to a Specification Macro.

Macro Name
This Property requires the name of a Specification Macro. It determines the Macro to
run.

This Property must be filled in with the name of a Specification Macro. Without setting
the Macro Name Property, clicking the Macro Button will have no effect.

The Property is dynamic by default so you can build a Rule to run a different Macro
depending on other values.

Tip:

Use the Macros button on the Command Bar of the Rule Builder to link a Macro Button
to a Specification Macro. This will prevent any accidental mismatch in the name of the
Specification Macro.

Picture Properties
There are 5 properties that control the picture used on a Macro Button and how those
pictures are displayed. They are:

• Picture
This Property determines the picture shown on a Macro Button.
• Picture (Hover)
This Property determines the picture shown on a Macro Button when a cursor
hovers over the control.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 273


• Picture (Pressed)
This Property determines the picture shown on a Macro Button when the button
is in the process of being clicked.
• Picture Size Mode
This Property allows you to determine the size mode of the picture, in the same
way you can control the size mode on a Picture Box Control.
• Picture Style
Finally, this Property determines how the pictures are applied to the button.

In all cases, experimenting with each of these Properties will provide you with a full
understanding of their function.

Macro Argument
The Macro Argument Property is optional; however, it can be incredibly useful. The
result of the Macro Argument Property is written to the Special Variable called
DWCurrentMacroArgument each time the Macro Button is clicked. Therefore, you
can use this special Variable in other Rules to provide a different result based on the
button that was clicked.

A simple example of this is with ‘Add’ and ‘Subtract’ buttons. Instead of creating two
Specification Macros, one to add and one to subtract, both buttons could use the same
Specification Macro.

By using the same Specification Macro, the result would be the same for both buttons.
However, by referencing the Macro Argument, you could have different results. With
the Macro Argument set to +1 for the Add button and -1 for the Subtract button, the
DWCurrentMacroArgument could be used in the calculation. The Rule, if you were
changing a constants value, would be:

DWConstantExample+DWCurrentMacroArgument

If the Constant had a value of zero and the subtract button was clicked, the Rule would
be 0+-1 which equals -1.

If the Constant had a value of zero and the add button was clicked the Rule would be
0++1 which equals 1.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 274


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 275
Lesson 13 Exercise
In this lesson we will be adding a Macro Button to our Project which will run a
Specification Macro to export an image of the Pricing Form and store it in the
Specification Folder.

We will need to create a Specification Macro to do this. We will also be looking at a


new Document Type, Export Form.

1. Go to the Main Left 3 Form and create a new Macro Button Control

2. Call this Control CreateSnapshot. Position the Button so it looks like the image
below

This will add a blank Macro Button to the Form. You can resize and move this button
to look right on the form.

Note:

Macros cannot be run in Form Design Test Mode. If you go into Test Mode on your
Form and click the button, a dialog will appear telling you this.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 276


3. Click on the Form background to deselect the Macro Button Control. Change the
Background Color of the Form from Transparent to White

This is so you can see the text when we export the form later. If the background was
left as Transparent, it would be difficult to read the black text when viewing the image.

Now that we have created our Macro Button, the next thing we must do is create the
Export Form Document.

Concept: Export Form Document

An Export Form Document, when released, will create an image file of the specified
Form. The Form will be cropped to the minimum size it can be, whilst still showing all
the visible Controls. The Export Form Document is found in the Documents – Files tab.

4. Go to Documents – Files tab and add a new Document

5. Select Export Form and give it the name Export Summary Form

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 277


This will now open the Export Form Document in the window. We are now going to
build some rules to determine both the Form we wish to Export, and the location and
name of the image that will be created.

6. Click the Build button at the end of the Form to Export row to launch the Rules
Builder

7. Change the rule from “Main Header” to “Main Left 3”. This will make sure the
correct form is exported

The Main Left 3 form is the Form shown when the Pricing Tab is selected, it’s also the
Form we created the Macro Button on earlier.

8. Now Build a rule for the Output Path. Build the following rule:

Note:

We do not need to build the path for this rule. This is because the Output Path will by
default use the Specification Path if no other path is specified. Therefore, we are just
going to specify the file name and save it into the Specification Folder.

9. Click OK to Save the Document

Now that we have created the Export Form Document, we now need to create a
Specification Macro to release the Document and create the image.

Tip: You can Preview your Form Export Document to check you are exporting the
correct Form.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 278


Concept: Specification Macros

Specification Macros are used to run Specification Tasks. You can have any number
of Tasks contained within one Macro. Specification Macros can be triggered in various
ways, such as Macro Buttons and Specification Flow Operations and Transitions.

10. Go to the Specification Macros tab

The above image shows the different sections of the Specification Macros tab.

• Specification Macro Tree– All the Specification Macros available in a


Project. Can be organized into categories.

• Specification Macro Flow Area – With a Macro selected, this central pane
shows all of the tasks and conditions contained within the Macro.

• Specification Task Toolbox – This contains a list of all the Specification


Tasks that can be added to a Specification Macro.

• Specification Condition Toolbox – This contains a list of all the


Specification Conditions that can be added to a Macro.

11. Click the Add button to create a new Specification Macro, call this
CreateFormSnapshot

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 279


Tip:

Specification Macros, like Variables, can be organized into categories to make


managing and developing your Project easier.

Now that we have created a Specification Macro, we need to add some Specifications
Tasks to run when the Macro is triggered using the button you created on your form.

Concept: Specification Tasks

Specification Tasks can perform a variety of tasks, either internally or externally to


DriveWorks. For example, there is a Specification Task to copy a file on disk, as well
as one to drive a value into a Constant.

12. Add the Release Documents Task to the Macro by double clicking it in the right-
hand side Toolbox

Specification Tasks

Specification Tasks have a few key features that determines their behaviour. The
image below shows a standard Specification Task.

Endpoints can either be an input or an output, Navigation or Data. An input Endpoint


is used to send data to a Task, whereas a Data output is used to send data from a
Task. Data outputs and data inputs are normally linked to Specification Task
Properties. Data Endpoints are black in color.

Specification Task Properties determine the outcome of the Task. You can make a
Task dynamic by double clicking the sigma symbol next to it.

Navigation Endpoints are used to determine the flow of the Macro. Navigation
Endpoints are green in color. Like Data Endpoints, Navigation Endpoints have inputs
and outputs which determine the order in which Tasks or Conditions are ran.

For all Endpoints, an input must be connected to an output, and vice versa. Also, a
Navigation Endpoint must be connected to another Navigation Endpoints, and the
same with Data Endpoints.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 280


Concept: Macro Start Node

Specification Tasks are required to be connected to the Specification Macro flow in


order for them to run. This can either be via another Specification Task, or directly to
the Start node itself.

We now need to connect the Macro Task into the Specification Macro flow using the
Navigation Endpoints on the Start node and the Release Document Task we just
added.

13. Click and drag the green Navigation Endpoint on the Start node and join it to the
input Navigation Endpoint of the Release Documents Task node

The Task is now correctly linked into the Specification Macro flow. Tasks will only be
run when they are correctly joined together using connections between Navigation
Endpoints.

Most Tasks will have Properties that determine what the Tasks do when they are run.
Properties can either be static or dynamic, or you can use some of the special
Connection Points to automatically populate the Properties of a Task.

Tip:

To delete a connection, hover over one of the Navigation Endpoints, and click the red
cross next to the connection you want to delete.

Now our Specification Macro Task is connected into the Specification Macro flow, we
need to control its behaviour using its Specification Task Properties

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 281


Concept: Specification Task Properties

Specification Task Properties control the behavior of a Task. Properties have Data
input and output Endpoints which can be used to determine the value of the property,
or pass its value to another property. You can also build a rule for these properties.

14. Select the ? icon on the Release Document Task.

You can see by reading the Description for the Documents Property that the Task
simply needs to know the name of the Document we want to release. In this case, our
Form Export Document

15. Click the cross or the dimmed background to close the Help

16. Select the Export Summary Form from the Documents Property in the Release
Documents Task

Tip:

You can zoom in and out in the Macro Task Editor using the slider at the bottom of the
window or by holding Ctrl and scrolling with you mouse.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 282


We have now finished creating the Specification Macro. All that is left to do is link the
Macro we have just created back to the Macro button on our form. We do this using a
Property of the Macro Button control called Macro Name.

17. Navigate back to the Form Designer and go to the Main Left 3 Form

18. Select the Macro Button you created at the start of this lesson

19. Build a rule for the Macro Name Property of the Control

The Macro Name Property is what links the Macro button to the Specification Macro
you want it to run. The Property is Dynamic by default.

20. From the Command Bar of the Rules Builder select the Macros button. A dialog
will appear showing a list of all the Macros in your Project

21. Select the CreateFormSnapshot Macro and click OK

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 283


Note:

This will add the Macro to your rule in a String format. You could also have manually
typed in this rule.

22. Run through a Project and click the Create Snapshot button. Do not click Save or
Generate, but instead open File Explorer and view the image that you have created
by going to your Specification Folder, and going into the most recent (highest
numbered) folder

You have now completed the DriveWorks Pro Essentials Training. Make sure you run
through your Project several times to make sure that everything that you have
implemented works.

If you want to further your knowledge of DriveWorks by increasing the functionality in


your Conveyor Project, why not have a go at the DriveWorks Pro Advanced Manual,
available from the DriveWorks community.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 284


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 285
Appendix
© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 286
Preparing Your Models for Automation
The models that were provided for you during this training were created with
automation in mind. They therefore have no design tables, or in-context design, and
have been mated together on pre-defined planes.

When DriveWorks creates new model sets based on the masters, it is copying files
and then re-referencing any associated files.

It is therefore wise to construct the models and create mates knowing what is to be
driven.

For instance, if you mate parts in an assembly based on one of its features, and then
delete that feature based on a Rule, the mate will error in the new clone.

It is important to understand just how models will be driven. It is also important to be


able to understand the design logic, especially when building and testing the Rules. If
in-context design is used, along with design tables and/or equations, and then
DriveWorks is also used to drive dimensions, features and custom properties,
correcting any unexpected model results can be hard work, as it’s difficult to know
where to look first to resolve the issue.

In-context Design
Be careful with in-context design when drilling down more than one level. DriveWorks
is fine with one level of in-context design, but because DriveWorks is creating new files
based on the masters, you need to be careful to ensure that the correct model is
referenced at all times.

Therefore, do not have a Part in an assembly that is modelled up to a face on a


different part in the same assembly, as the references will not update correctly when
new clones are created.

DriveWorks will also not update references if a Part is in a sub assembly, which is in
an assembly, and the part is modelled in-context of the top level assembly. Stick to
one level only.

If multi-level in-context design is insisted upon, have sketches or planes in the sub
assembly that are in-context with the assembly, and then drive the Part from the sub
assembly.

Part Equations
Using part equations is fine, although DriveWorks will only perform the rebuild
operation once, after it has driven dimensions, features and custom properties. If the
equations are in the wrong order, subsequent manual rebuilds may be required.

That said, there is an argument to say that if you are controlling dimensions from
DriveWorks based on Rules, there is little need to use equations.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 287


Assembly Equations
Avoid using assembly equations. They can cause unexpected results in the resulting
files.

Configurations
DriveWorks can use Rules to select an existing configuration to use. When
DriveWorks is driving a dimension or feature, it will do this for all configurations, unless
the feature or dimension is configuration specific, then it will only be driven in that
configuration.

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 288


Useful Information
The DriveWorks Today Task found in Stage 1 of the Task Explorer will keep you up to
date with all of the latest technical posts and blogs from the DriveWorks Team.

The DriveWorks Pro Help File is an invaluable source of information. Press F1 on your
keyboard, or click the question mark button in the top right hand corner of the
dialog.

The online Help File is continually updated with new articles and represents the
version that will be incorporated into the next service pack of DriveWorks.

You can view the Help File online at http://docs.driveworkspro.com/

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 289


© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 290
Index
Adding Inputs ...................................................................................................................... 53
Alignment Guides................................................................................................................ 62
Annotation Positions ......................................................................................................... 230
Annotation Text ................................................................................................................. 227
Caption Property ............................................................................................................... 61
Capture With Rules ........................................................................................................... 230
Capturing Models ................................................................................................................ 34
Component Sets ............................................................................................................... 179
Control Properties ............................................................................................................... 53
Document File Name and Relative Path............................................................................ 201
Documents........................................................................................................................ 201
Drawing Scale ................................................................................................................... 244
Drawing View Positions..................................................................................................... 244
Drawings ........................................................................................................................... 223
Driving Replaced Files ...................................................................................................... 179
Duplicating Rules .............................................................................................................. 186
DWColor ............................................................................................................................. 40
DWSpecification................................................................................................................ 125
Extract Variable................................................................................................................... 98
Filtering ............................................................................................................................... 97
Form Decisions ................................................................................................................... 54
Form Navigation................................................................................................................ 153
Form Templates ................................................................................................................ 154
Functions ............................................................................................................................ 72
Generation Tasks.............................................................................................................. 247
Group Controls.................................................................................................................... 66
Helper Links ........................................................................................................................ 25
IF Function .......................................................................................................................... 89
Imported Projects ................................................................................................................ 59

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 291


Instance Rules .................................................................................................................. 137
Intelligent File Names........................................................................................................ 134
Macro Argument ............................................................................................................... 275
Macro Buttons ................................................................................................................... 274
Model Generation ............................................................................................................. 110
Model Generation Preview ................................................................................................ 111
Model Generation Report .................................................................................................. 117
Model Insight .................................................................................................................... 192
Model Preview within SOLIDWORKS ............................................................................... 192
Model Rules ........................................................................................................................ 74
Name Property .................................................................................................................. 61
Navigation ........................................................................................................................... 53
Organization of Data and Projects....................................................................................... 23
Pre Drive Tasks ................................................................................................................ 248
Project Templates ............................................................................................................... 59
Projects ............................................................................................................................... 51
Replacement Component ................................................................................................. 189
Rescale and Position View Generation Task ..................................................................... 247
Rule Builder Diagnostics ..................................................................................................... 55
Rules Insight ....................................................................................................................... 82
Security ............................................................................................................................... 24
Special Variables .............................................................................................................. 131
Specification Reports ........................................................................................................ 114
Specification States .......................................................................................................... 260
Specification Test Mode .................................................................................................... 120
Static and Dynamic Properties .......................................................................................... 155
Tables ............................................................................................................................... 141
Testing your Form Controls ................................................................................................. 67
Text Function .................................................................................................................... 103
Variable Categories ............................................................................................................ 73

© DriveWorks Ltd DriveWorks Pro Essential Training www.driveworkspro.com 292

You might also like