DriveWorks Pro 15: Model Rules General [send feedback...]

File Name Rule

The file name rule is used to determine the name of the driven model, or, in the case of a subassembly or part, to delete it or control its suppression state, visibility in the parent assembly.

RuleMeaning
TRUEUnsuppresses the subassembly or part, you could also use "Unsuppress" (in quotes), or "U" (in quotes).
FALSESuppresses the assembly or part, you could also use "Suppress" (in quotes), or "S" (in quotes).
"DELETE"Deletes the subassembly or part from its parent assembly.
DWSpecificationIdCreates a new subassembly or part with its filename set to be its original file name, suffixed with the specification number - for example, "Block.sldprt" would become "Block 1.sldprt" if it was generated by the first specification.
"*" & DWSpecificationIdCreates a new subassembly or part with its filename set to be the specification number - for example, "Block.sldprt" would become "1.sldprt" if it was generated by the first specification.
"*" & DWSpecificationId & "*"Creates a new subassembly or part with its filename set to be its original file name, prefixed with the specification number - for example, "Block.sldprt" would become "1 Block.sldprt" if it was generated by the first specification.
"<Replace>MyComponentSetName"Replaces the subassembly or part with a Component Set called MyComponentSetName. For more information, see the How To: Replace a Component With a Static or Driven Replacement Model help topic.
"*" & DWSpecificationId & "<MASTER:NAME>" & OrderNumberReturn

Creates a new subassembly or part with its filename set to be the specification number, followed by the name of the master model the component is generated from, followed by the  data entered into the OrderNumber form control.

For example the master model "Block.sldprt" would become "1Block1234.sldprt" if it was generated by the first specification and 1234 was entered into the OrderNumber form control.

Deleting Components included in a Pattern

When a component, that is used as the seed for a pattern, is deleted from an assembly the pattern will also be deleted.

If the pattern includes any other components ensure the component deleted has not been used to define any parameters of the pattern.

The generated assembly will show rebuild errors if this is the case.

Relative Path Rule

The relative path rule controls the folder that the driven model is created in.

If the result of the Path rule results in a folder that does not currently exist DriveWorks will create it.
RuleMeaning
""If the project is located at "C:\DriveWorks Pro\My Cupboard\My Cupboard.driveproj" then the driven model will be created in "C:\DriveWorks Pro\My Cupboard\Results\".
DWSpecificationIdIf the project is located at "C:\DriveWorks Pro\My Cupboard\My Cupboard.driveproj" and the specification number is 56 then the driven model will be created in "C:\DriveWorks Pro\My Cupboard\Results\56\".
"\\dataserver\models\cupboards"The driven model will be created in "\\dataserver\models\cupboards"

Configuration Rule

The configuration rule provides the ability to switch the configuration of the model.

RuleMeaning
The configuration of the model is left in the current configuration.
"Red"The configuration of the model is switched to Red.
"*Red"The configuration of the model is switched to Red and all other configurations are deleted. If a design table is present, it is deleted too.
"Red <As Machined>"The configuration of the weldment model is switched to Red <As Machined>

In an ordinary SOLIDWORKS part, a configuration has a name and a description. Switching a configuration in DriveWorks means you need the name of the configuration.

In a weldment, a configuration has a name, a description, and a "real name". By default, the "real name" and the description are the same, i.e. the name of the configuration suffixed with "<As Machined>" or "<As Welded>".

The "real name" is the name DriveWorks needs to switch the configuration - without the suffix, the name of the configuration wouldn't be unique.

The description can be changed away from the "real name" at any time and will not affect the "real name"

Tags Rule

The Tags parameter is only available for top level models.

Tags are relevant when two or more DriveWorks Autopilot machines are deployed.

Tags allow control over which DriveWorks Autopilot generates the models required for a specification.

The result of the Tags rule must match a tag set in DriveWorks Autopilot.

RuleMeaning
If(HighPriorityCheckBox=True,"High","Low")When the checkbox HighPriority is checked will result in the tag High being applied to the parameter. Otherwise the tag low will be applied.
DriveWorks Autopilot must be set to process the information being tagged.

Feature Rule

Feature rules control the state of a feature, i.e. suppressed, unsuppressed, or deleted.

RuleMeaning
TRUEUnsuppresses the feature, you could also use "Unsuppress" (in quotes), or "U" (in quotes).
FALSESuppresses the feature, you could also use "Suppress" (in quotes), or "S" (in quotes).
"DELETE"Deletes the feature.

Some Features can have Advanced Feature Parameters captured, which gives control over elements of the feature usually only accessible through the SOLIDWORKS feature manager. For information on how to capture Advanced Feature Parameters please see Advanced Feature Parameters. For information on writing rules for Advanced Feature Parameters please see Model Rules Advanced Feature Rules - Overview.

Deleting Features included in a Pattern

When a feature, that is used as the seed for a pattern, is deleted from a part the pattern will also be deleted.

If the pattern includes any other features, the pattern instances of these features will also be deleted.

Dimension Rule

Dimension rules control the length or angle of a dimension.

RuleMeaning
1098Results in the dimension being driven to a static value of 1098.
TAND(AngleReturn) /AdjacentReturnResults in the dimension being driven to the length of the opposite side of a triangle whose angle and adjacent side length were provided.
The result of any dimension rule needs to be in the same units as the model the dimension has been captured from.

Tolerances

The captured dimension can also have the tolerance controlled. When controlling the tolerance of a captured dimension the format of the output rule is:

DimensionNominalValue|DimensionLowerLimit|DimensionUpperLimit|Type

Where

DimensionNominalValue is the nominal dimension to be applied to the parameter (in the SOLIDWORKS document units)
DimensionLowerLimit is the lower limit for the tolerance (in meters - SOLIDWORKS system units)
DimensionUpperLimit is the upper limit for the tolerance (in meters - SOLIDWORKS system units)
Type is an index number for the type of tolerance to be applied - see chart below.

Tolerance TypeIndex
Basic1
Bilateral2
Limit3
Symmetric4
MIN5
MAX6
Fit7
Fit with tolerance8
Fit tolerance only9

RuleMeaning
25 & "|"& -0.002 &"|"& 0.001 &"|"& 2Drives the dimension to a nominal value of 25, with a lower limit of -0.002, an upper limit of 0.001 with a tolerance type of Bilateral being applied
NominalDiameterReturn&"|"&DWVariableLowerLimit*(25.4/1000)&"|"&DWVariableUpperLimit*(25.4/1000)&"|"& 3

Drives the dimension to the value entered into the form control named NominalDiameter.
Drives the lower limit to the value calculated by the variable LowerLimit (inches), which is then converted to meters.
Drives the upper limit to the value calculated by the variable UpperLimit (inches), which is then converted to meters.
Applies a limit tolerance type (Index 3)

The tolerance precision must be set in the master model for the dimension that is to have a tolerance controlled.

Custom Property Rule

Custom property rules control the text of a custom property. For more information about special custom properties used for driving colors, materials, and textures, see Custom Properties.

RuleMeaning
CustomerReturnResults in the custom property being set to the value the user typed into a text box called Customer.

Special Custom Properties

There are some custom property names that, when captured, will allow further model properties to be driven. These are:

  • DWColor or DWColour - Will drive the color of the model to the value specified. Additional parameters allow the illumination properties to be controlled.
  • DWMaterial - Will drive the material of the model to the value specified.
  • DWTexture - Will drive the texture of the model to the value specified.

To drive these properties create a custom property (with the name of the property to be driven as listed above) in the model and capture it in DriveWorks, so it can be seen in the model rules stage of DriveWorks Administrator.

The result of the rule for each of these properties are given in the examples below:

Custom Property Name - DWColor (or DWColour)

Result Format (to drive color only):

Red|Green|Blue

Result Format (for additional illumination parameters):

Red|Green|Blue|Ambience|Diffusion|Specular Amount|Specular Spread|Transparency|Emissivity

RuleMeaning
0|0|255Results in the custom property being set to the value 0|0|255. This will drive the color of the part to be blue.
0|0|255|0.6|0.4|0.5|0.75|0.25|0.1Results in the custom property being set to the value 0|0|255. Additionally the illumination properties will be set as follows:

Ambience - 0.6

Diffusion - 0.4

Specular Amount - 0.5

Specular Spread - 0.75

Transparency - 0.25

Emissivity - 0.1

Custom Property Name - DWMaterial

RuleMeaning
CustomerReturnResults in the custom property being set to the value the user typed into a text box called Customer.

Custom Property Name - DWTexture

RuleMeaning
CustomerReturnResults in the custom property being set to the value the user typed into a text box called Customer.

Instance Rule

The instance rule is used to determine the suppression state, delete, replace the instance or change the configuration of the instance. An instance can have its state changed and configuration switched by using the following syntax

" [State Operation] | [Configuration Name] "

Where

State Operation is the operation to carry out on the state of the instance (Delete, Suppress, Replace and ReplaceFile.)

Configuration Name is the name of the configuration to switch to.

Replacing the instance with a file.

When the instance is to be replaced with a file there are two options that can be used:

  • <Replace> - Will replace the instance with a file that has been captured (either Static or Dynamic) in DriveWorks. (The file name follows the <Replace> string). See How To: Replace a Component With a Static or Driven Replacement Model for more information.
  • <ReplaceFile> - Will replace the instance with a file that is not captured in DriveWorks. (i.e. any model that DriveWorks is totally unaware of)
RuleMeaning
TRUEUnsuppresses the instance, you could also use "Unsuppress" (in quotes), or "U" (in quotes).
FALSESuppresses the instance, you could also use "Suppress" (in quotes), or "S" (in quotes).
"DELETE"Deletes the instance from its parent assembly.
"HIDE"Hides the component instance.
"SHOW"Will show the component instance.
"Red"The configuration of the model is switched to red.
"<Replace>MyComponentSetName"Replaces the instance with a Component Set called MyComponentSetName. For more information, see the How To: Replace a Component With a Static or Driven Replacement Model help topic.
"U|Red"Will unsuppress the instance and switch the configuration to Red.
"<Replace>MyComponentSetName|Red"Replaces the instance with a Component Set called MyComponentSetName and switches the configuration of the replacement file to Red.
"<ReplaceFile>D:\Models\Part1.sldprt"Will replace the instance with Part1.sldprt located in D:\Models\.
"<ReplaceFile>Models\Part1.sldprt"Will replace the instance with Part1.sldprt located in the Models folder, which is relative to the specification path.
"<ReplaceFile><Project>\Models\Part1.sldprt"Will replace the instance with Part1.sldprt located in the Models folder inside the <Project> location.
The following directives can be used to reference the various folder DriveWorks uses
  • <Project> - Is the project folder location.
  • <Specification> - Is the specification folder location.
  • <SpecificationMetaData> - Is the specification meta data folder.
  • <GroupContent> - Is the group content folder.

A part or assembly which has been added to the Model Rules screen and is not contained in a parent assembly.

A part or assembly which has been added to the Model Rules screen and is not contained in a parent assembly.

A part or assembly which has been added to the Model Rules screen and is not contained in a parent assembly.

Table of Contents