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.
Rule | Meaning |
---|---|
TRUE | Unsuppresses the subassembly or part, you could also use "Unsuppress" (in quotes), or "U" (in quotes). |
FALSE | Suppresses 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. |
DWSpecificationId | Creates 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. |
"*" & DWSpecificationId | Creates 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. |
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.
The relative path rule controls the folder that the driven model is created in.
Rule | Meaning |
---|---|
"" | 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\". |
DWSpecificationId | If 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" |
Please see Info: Where To Store DriveWorks Data for information on where to store the data associated to a DriveWorks implementation.
The configuration rule provides the ability to switch the configuration of the model.
Rule | Meaning |
---|---|
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"
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.
Rule | Meaning |
---|---|
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. |
Feature rules control the state of a feature, i.e. suppressed, unsuppressed, or deleted.
Rule | Meaning |
---|---|
TRUE | Unsuppresses the feature, you could also use "Unsuppress" (in quotes), or "U" (in quotes). |
FALSE | Suppresses the feature, you could also use "Suppress" (in quotes), or "S" (in quotes). |
"DELETE" | Deletes the feature. |
"255|0|0" | Will drive the feature to the RGB value 255,0,0 (red)
Driving a feature to a color requires the RGB value to be formatted with each value to be separated with a pipebar.
If a numeric value is driven to the feature that is not in this format (28 for example) DriveWorks will apply a color using default gray numbers for the missing G and B values. |
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.
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 rules control the length or angle of a dimension.
Rule | Meaning |
---|---|
1098 | Results in the dimension being driven to a static value of 1098. |
TAND(AngleReturn) /AdjacentReturn | Results in the dimension being driven to the length of the opposite side of a triangle whose angle and adjacent side length were provided. |
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 Type | Index |
---|---|
None | 0 |
Basic | 1 |
Bilateral | 2 |
Limit | 3 |
Symmetric | 4 |
MIN | 5 |
MAX | 6 |
Fit | 7 |
Fit with tolerance | 8 |
Fit tolerance only | 9 |
Rule | Meaning |
---|---|
25 & "|"& -0.002 &"|"& 0.001 &"|"& 2 | Drives 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.
|
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.
Rule | Meaning |
---|---|
CustomerReturn | Results in the custom property being set to the value the user typed into a text box called Customer. |
DriveWorks Quick Tips | |
DriveWorks Quick Tips: Custom Properties Custom properties allow you to control the custom properties within a part, assembly, or drawing. We can control anything from text to be displayed, to the colour of the part. Here, we control the colour of a chair, as well as the description and title on the drawing. | |
DriveWorks Quick Tips are a series of 1 minute videos, available on YouTube, that explain specific functionality. View all Quick Tips |
There are some custom property names that, when captured, will allow further model properties to be driven. These are:
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
Rule | Meaning |
---|---|
0|0|255 | Results 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.1 | Results 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
Rule | Meaning |
---|---|
CustomerReturn | Results in the custom property being set to the value the user typed into a text box called Customer. |
Custom Property Name - DWTexture
Rule | Meaning |
---|---|
CustomerReturn | Results in the custom property being set to the value the user typed into a text box called Customer. |
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.
Order Of Instance
The instance order in the SOLIDWORKS feature manager does not necessarily follow the order DriveWorks recognizes.
DriveWorks requires the Instance number to be taken from the order it is listed in the SOLIDWORKS Feature Manager. For example:
SOLIDWORKS Feature Manager display | DriveWorks Order Of Instance |
---|---|
Part<5>
Part<1> Part<4> Part<3> | Part-1
Part-2 Part-3 Part-4 |
If you are unsure of the instance ordering, the DriveWorks capture assistant will indicate the order through Captured Parameter Highlighting.
In the image below Flange <5> in the SOLIDWORKS feature manager is Instance 1 to DriveWorks.
Captured Parameter Highlighting indicates the instance parameter in the DriveWorks capture assistant, on the model AND in the SOLIDWORKS feature manager.
When an instance rule results in Delete and the Assembly is also being looped through a Generation Task, the deletion must occur on the last loop.
This is because deleting an instance changes the order of instances in the feature tree.
To achieve this the special variable Current Release Loop Index can be used in the rule, as follows:
If(DWCurrentReleaseLoopIndex= LoopCount, "Delete","")
Where:
LoopCount is the value used in the Loop Count property in the Model Specific Generation Task.
When the instance is to be replaced with a file there are two options that can be used:
DriveWorks Quick Tips | |
DriveWorks Quick Tips: Replace Feature Let’s say you have an assembly for a dresser that can have two different doors. You don’t really want to make two different DriveWorks projects for the same assembly, you would rather just have DriveWorks replace the door for you. Now if only there was a video explaining how it could be done… | |
DriveWorks Quick Tips are a series of 1 minute videos, available on YouTube, that explain specific functionality. View all Quick Tips |
Rule | Meaning |
---|---|
TRUE | Unsuppresses the instance, you could also use "Unsuppress" (in quotes), or "U" (in quotes). |
FALSE | Suppresses 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
|
"U|<ReplaceFile>Models\Part1.SLDPRT" | This will unsuppress the instance and replace with the given file. |
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.