Sunteți pe pagina 1din 24

DriveWorksXpress

A fantastic new tool for design automation included with every seat of SolidWorks 2008 is
DriveWorksXpress. Many parts and assemblies you design everyday are often just repeats of another
similar part, often following the same engineering rules.

Configurations generally do a job for items that are fairly static in sizes, but if you want vast variability
DriveWorksXpress is the way to go.

In this edition of DriveWorks Tips we will illustrate how easy it is to automate the design of a part with
DriveWorksXpress. The images below show the part and part drawings we wish to automate. We want
to offer the customer the ability to buy the part in the following configurations:

• Length: Any length to 2 place decimals between 2 and 8 inches


• Width: Between .25 and .75 in .0625 increments.
• Depth: Width / Golden Ratio
• Thickness: If Width is less than .50 then the thickness is .024, otherwise it is .048
• Corner Break: Choice of having the break or not and the value is half the Depth

If you considered just the choices between the Width and Corner Break that would be 16 configurations
required, however, if we introduce the length possibilities that would mean 600 X 16 for a total of 9600
configurations. Not practical for a SolidWorks part model!
Starting DriveWorksXpress
Let’s see how we can automate this part and drawing set with DriveWorksXpress.

From the Tools menu in SolidWorks, select DriveWorksXpress… and the DriveWorksXpress wizard
will appear.

If this is your first time running DriveWorksXpress, it will open a default database which you can see
below under the Active Database heading. This is where DriveWorksXpress will store your
applications you create for parts and assemblies. You can have as many databases as you wish, and
each database can have tons of models controlled.

We want to create a new database in a particular folder, so we will select the Create/Change
Database radio button as shown above, and then click on the Next button.
A standard Open dialog box will allow us to browse to the folder desired, and give a name to the
database. There is no restriction on these names, and could be based on product type, projects, part
type, whatever you think makes sense.

Once we have entered a name and selected Open, DriveWorksXpress creates the new database and
moves you along in the process. If you look at the top of the DriveWorksXpress screen below you see
that there a series of tabs which DriveWorksXpress will take you through.

We are now at the Capture tab, which is where we will select the models we want to automate and
then capture the dimensions and features in the models we want to control with rules.

You can see that since we did not have a model open in SolidWorks at the time we started
DriveWorksXpress the Use current open model selection is grayed out, but we can Browse for new
model.
Click on Next, and then select the model as required.

NOTE: In this example we are looking for a SolidWorks Part file, so we need to ensure we select
SolidWorks Part (.sldprt) from the Files of type drop list in the Open dialogue box.
Capturing SolidWorks Data
DriveWorksXpress will open the selected model in SolidWorks and then present you with Dimensions
and Features sub-tab of the Capture tab. Since this the first time here there are no dimensions or
features currently captured.

Click on the Add button.

DriveWorks switches us to SolidWorks and opens the DriveWorksXpress tab in the SolidWorks
property manager as shown below. Activate the model dimensions by any method, in this case we
right-clicked on Annotations and selected Show Feature Dimensions.

We want to capture all the dimensions and features that DriveWorksXpress will control with rules, and
at the same time we want to assign names to the dimensions which make more sense to us. In the
example below, we click on the 4.500 dimension for the Length of the part, and we see in the
DriveWorksXpress property manager that the SolidWorks Selection is D2@Base-Flange1@Channel
Part which is pretty useless. Now of course all good SolidWorks users always rename their dimension
names and features to make it easy for everyone to understand, however, if they forgot, then we can
give DriveWorksXpress a name for the dimension.

In the New DriveWorks Name box we enter Length as the name, and click Apply.
DriveWorksXpress shows the captured SolidWorks dimension in the Captured Information area and
the corresponding name. We will complete the capture of the rest of the dimensions we want to control
in a similar manner.

We said back at the beginning we wanted to give the option of having a corner break or not so we need
to capture the Corner-Break feature as well. We do this in a similar fashion to capturing dimensions.
Just select the feature you desire either in the feature manager, or on the part directly and give it a
name.

NOTE: You can not give features or dimensions a name if that name has already been used.
Click Apply and we see the Corner-Break feature added to our Captured Information list.

Once you are finished capturing dimensions and features click on the Finish button on the
DriveWorksXpress property manager.

NOTE: The Help button accesses the comprehension help file which has all the information required to
create a DriveWorksXpress application.
DriveWorksXpress returns us to the wizard and shows us all the dimensions and features we captured
from our SolidWorks model.

The next step in our capture process is to capture any SolidWorks file properties we want to control
with our DriveWorksXpress application. Activate the Properties sub-tab, and we see a list of all the
properties currently in our SolidWorks part as shown below.

In this example we will just control the Description and DrawnBy properties. Select the property on the
left and click on the single chevron (>) to capture the property.
Next we need to let DriveWorksXpress know which drawing is associated with our current part model,
so we select the Drawing sub-tab. DriveWorksXpress informs us that we have no drawing currently
captured, so select the Browse button

Select the appropriate drawing.

We are now finished capturing the information to drive our model with DriveWorksXpress. This process
only takes a few minutes.
Creating the Input Form
The next step in the DriveWorksXpress application design process is to create the input form the user
will use to define new versions of the SolidWorks model and drawing.

Select the Form tab in the DriveWorksXpress wizard. Here you create the various inputs required and
select the type of input control that you wish. There are five input styles available:

Text Box: Enter alpha-numeric information


Numeric Text Box: Enter numeric information – allows limits to be set
Drop Down: Presents a list of selections
Spin Button: Numeric selection with limits and increment value
Check Box: Logical yes or no

The type of control will depend on the input required. For example we will start with the selections we
want to have sent to the DrawnBy property we captured earlier. This makes sense to be a Drop Down
list of designers that will access the application.

We will select the Drop Down list from the Type selection, and notice that the Name and Options boxes
below are show in a reddish colour. This indicates an error or a missing piece of information.

We will call the control Drawn By and then add a list of names in the Options area. Also note that we
have the option of making the control mandatory by selecting Required option check box. This will
cause the control to be red if the user does not select some choice and DriveWorksXpress will not
continue.
Clicking on the Next button will return us to the Form tab where DriveWorksXpress keeps track of the
controls as we add them. Click on the Add button to create a new control.

For the Length input we will select a Numeric Text Box and make the minimum acceptable value 2
and the maximum 8, which is what we said we would allow our customers to order.

Add another control for the Width, this time we will make it a Spin Button with a minimum of .250, a
maximum of .750 and an increment of .0625, again to reflect our initial requirement.

The last control we need is Check Box which will call Corner Break to allow the user to have the corner
break feature or not on the part.
Our form is now complete. DriveWorksXpress lets us test the form by simply selecting the Test button.

The form is presented for test.

NOTE: It is a best practice to set some sort of defaults in your form, especially during this design stage
as it will allow you to see if your rules you create are working correctly as you build them.

Creating Rules
The next step in the DriveWorksXpress automation process is to create the rules that will drive your
SolidWorks models. Clicking on the Rules tab will take you to the main Rules builder page. Here we
see a list of Rule Types, how many of each type there are, how many rules are missing, that is, how
many you still need to define, and what set of rules (Action) you want to work on.
Let’s start with the Dimension rules, so select the Edit Dimension Rules check box, and then click on
the Next button. DriveWorksXpress will show the dimension names you created when capturing the
SolidWorks dimensions, the file name they belong to, the type of rule, the current value of the rule and
the formula used to create the rule. The option Show Missing Rules Only is checked, which will only
show Names whose rules have not been created yet. Working in this mode lets you know when you are
done – not items in the list means you have assigned rules to everything.

To access the specific rule, for example Length, either double-click anywhere on the row Length is in or
high-light the row and click on Next.
This is the Rules Builder area where you define the formula for your rule. There are several drop menus
to assist you in defining a rule at the top, and at the bottom it will display the value of the rule, and some
helpful hints.

The rule for our Length dimension is to make it equal to whatever the user enters in the Length input
on the form. So we just select the Length input from the Inputs menu. You can see that
DriveWorksXpress shows you in the menu what type of control it is with an icon that corresponds to
those shown back on the form design tab.

The resulting formula is shown as above and that current value is 5 (remember we set the default
Length to 5). Clicking the Next button takes us back to our rule list and we see that the Length rule is
gone from the list.

Now we will create the rule for the Width, which is again is just an input form value, as shown below.

Next up is the Depth rule which we said back in the beginning would be equal to the Width divided by
the Golden Ratio, which is 1.618. Select the Width from the inputs menu, and then add ‘/ 1.618‘as
shown below. Notice that the result is a ridiculously long number.

DriveWorksXpress rules are created using Microsoft Excel commands so we can make use of the
ROUND command to make sure we only send 3 decimal places to SolidWorks.

ROUND ( Width / 1.618 , 3 )


This results in a much nicer number.

At this point we realize we may want to save this formula to use again later. DriveWorksXpress has a
nifty little tool for doing this called Quick Text. Select the formula and copy it (CTRL C) and then select
the Recent menu, and then select Change Quick Text. Paste (CTRL V) the text you copied to the
Quick Text window.

Now the formula is available to be used elsewhere in the rule set easily as shown below by selecting
the recent menu.

The next rule we need is for the Thickness value. We said back at the beginning that we wanted the
thickness to be .024 if the width was .500 or less, otherwise it should be .048. The Logic menu
provides you with the basic logic commands used by DriveWorksXpress and are Excel commands.
The IF(,,) statement is what we need for the thickness rule. If you are new to Excel commands a good
tip is to use Excel help to get information about these commands. An example is shown below on the IF
statement.

The formula we need is shown below which states IF the Width is less than or equal to 0.500 the result
is 0.025, otherwise the result is 0.048. Save this rule to the Quick Text clipboard as well.

The next rule for CornerBreakSize is going to be half the Depth value. A limitation of
DriveWorksXpress (which is not the case in the full version DriveWorks) is that you can not have
intermediate variables to act as place holders. What this means is that we will have to re-use some
formulas to create the rule for the CornerBreakSize dimension.

If you recall, the Depth rule was the one we saved to the Quick Text clipboard, so we simply select it
from the Recent menu and then complete the formula by dividing that by 2.

The last rule is for the BendRadius which will have the same rule as the Thickness. Before we set
that rule, let’s set the rule list view to View Tree as shown below. Here we see all the rules associated
with the Channel part, their type, name, rule, and if the rule is missing. To activate the rule builder here
double click on the item you wish or select it and click on the Next button.

Select the same rule as Depth from the Recent menu. And return to the Rule list.

Next up we will create the rule for the CornerBreak feature. We said earlier that the customer will have
a choice of having this feature or not, and in our input form we created a Check Box control to select
this.
Once again, we select IF(,,) from the Logic menu and then complete the rule as shown below.

NOTE: Because the Check Box control returns a logical value, TRUE if checked, FALSE if un-
checked, you do not need to add the ‘= TRUE’ to the statement. That is, both statements below have
the same result.

IF (CornerBreak = TRUE, "Unsuppress", "Delete")

IF (CornerBreak, "Unsuppress", "Delete")

Now we will create the rule for the file names of the part and drawing. From the Rule list, double click
on the File Name row to open the rule builder.

We want the file names to be unique for every new part and drawing created, so to do this we will
append the current file name with the Length, Width and some indication of a corner or not. The result
should look like:

Channel X.XXX - .YYY – ZZ

The way DriveWorksXpress works for file names is that it always append the result of the rule to the
current file name. Create the rule as shown below.
We want the file names to be consistent, so we have added the Excel function FIXED(,) to the Length
and Width values to ensure the same number of digits appear. Since we are building a string, we use
the ‘&’ symbol to concatenate different strings together. The last part of the rule has an IF statement to
decide if a ‘CB’ for corner break is added as well. Add this rule to the Quick Text clipboard.

NOTE: There are many strings and commands that are used quite often in building DriveWorksXpress
applications and these should be put in the Quick Text clipboard. Some are:

“Suppress”
“Unsuppress”
“Delete”
& “-“ &

The final rules we need are for the Description and DrawnBy properties.

DrawnBy is just the Input DrawnBy.

Description is the word CHANNEL with roughly the same rule as the file name as shown below.
Creating New Variants
Now we are ready to start cranking out new designs using our application. Select the Run tab from the
DriveWorksXpress wizard, and we see our input form ready to go loaded with our default values set.

Let’s create on with the default values set.

Simply click on Next and DriveWorksXpress will open the model, change all the values, regenerate the
model, open the drawing, generate the views, rename all the files and save them. A report is generated
as it goes so you can see if there were any errors created as shown below.
The resultant drawing is shown below.
Let’s create another using the settings below.

The resulting model is shown below, note that the corner break feature is removed from the feature
tree.
Conclusion
As you have seen it is very easy and quick to automate parts and drawings with DriveWorksXpress.
You can start with a small project like this one, and progress towards more complex projects.

Next month we will use DriveWorksXpress to automate an assembly, all the parts in the assembly and
all the drawings associated with parts and assemblies.

If you want to try this example out, you can download the files.

S-ar putea să vă placă și