Online Book Reader

Home Category

SolidWorks 2011 Assemblies Bible - Matt Lombard [157]

By Root 1098 0
filenames. In this case, you can just copy the syntax of the rule from one part to the rest of the parts in the assembly.

Using custom properties with DWX rules

Up to now, this chapter discusses automating geometrical changes to the models, driven by selections on an electronic form. DWX also enables you to take advantage of changing custom properties with rules. Of course, you can then use custom properties to automatically fill out fields on the drawing, in tables, add properties to annotations on the drawing, and other uses.

Automating changes to the custom properties starts with capturing the properties in the DWX interface. In the Capture step, click the Custom Properties button at the bottom of the interface. DWX calls up all of the custom properties in the documents. You place a check mark next to the ones you want to capture and automate. Figure 18.12 shows this step.

FIGURE 18.11

Building rules for filenames


After the custom properties have been captured, they show up in the rules summary as missing rules. Place a check mark in the Edit column (shown in Figure 18.12) and click the blue right arrow.

This only captures the custom properties for the current document. To capture the properties of the assembly, you must have the assembly active. You must go through all the parts in the assembly to capture properties for individual parts.

FIGURE 18.12

Capturing custom properties


Building a rule for custom properties

The list of inputs for custom properties rules are the outputs from every field on the form. You can use these inputs to create a description of an item. For example, Figure 18.13 shows the rules and the result. You have to add quotes around text, add your own spaces to the text, and use an ampersand (&) to append words.

Running the example job

Once you have all of the pieces of design automation in place — the models, the database, and the rules — you need to run the job, in the same way that you might run a program after writing it. Running the job calculates all the values, renames all the parts, applies all the rules, and causes SolidWorks to update with all of the changes you are applying to the assembly through DWX.

FIGURE 18.13

Using rules and input values to create a description for a part


When you run a job, DWX presents you with the form to fill out, and then it updates the models and drawings. After a job is run, the results, which in most cases will be the SolidWorks parts, assemblies and drawings, are saved to a special folder with the name of the job. The green triangle in the DWX toolbar is the button that runs the job.

After creating your automation rules, DWX enables you to run the job. The DWX Summary shows numbers in red if any rules are missing (see Figure 18.12). In addition, the green, triangular Play button automatically appears in the DWX toolbar when the job can be run.

The interface does not offer a lot of control; it is not like programming interface elements with a high-level programming language. However, it is functional, and it can only be seen by the SolidWorks user — it cannot be distributed to non-SolidWorks users.

The fields in the form at this point are

• Number of Blades. Drop-down list to select 1, 3, 5, or 6.

• Project Name. Text box allowing free text entry.

• Blade Length. Numerical field accepting a range of manually typed numbers from 33 to 36 (it uses a tool tip to notify the user).

• Light Fixture. Check box (check for yes, uncheck for no).

• Hang or Flush Mount. Drop-down list.

Each one of these fields, except Light Fixture, has a yellow triangle with an exclamation point, indicating that it requires input from the user. Figure 18.14 shows a sample form with all of the fields set up during this example.

FIGURE 18.14

Filling out a form to run a job and generate a new set of assemblies and parts


When you fill in all the fields and start the job by clicking the Create button in the lower-right corner of the DWX Task Pane, SolidWorks opens each document and makes the changes dictated by the rules. When the job is

Return Main Page Previous Page Next Page

®Online Book Reader