File naming is an important consideration when planning an implementation, and DriveWorks affords complete flexibility in how files are named.
This document describes how files get named in DriveWorks, and how the names you choose interact with the concept of alternatives and driven alternatives so that you can build up libraries of parts that can be used again and again without needing to be generated for each specification that is generated.
The following key concepts are described in this document:
This is the default which is applied automatically to each captured model and drawing.
DriveWorks decides file names for models in a very simple way, for example, if we have the following assembly structure and file name rules:
| Assembly Structure | File Name Rule | Result (when Specification 18 is created) |
|---|---|---|
| MyAssembly | DWSpecification | MyAssembly MyProject 0018 |
| MyPartA | DWSpecification | MyPartA MyProject 0018 |
| MyPartB | DWSpecification | MyPartB MyProject 0018 |
| See Model File Name Rule and Drawing File Name Rule for more information. | ||
Here you can see that DriveWorks has simply suffixed the original component names, with a space, and the result of the Specification Name rule (in this case MyProject 0018).
DWSpecification is a special variable, see Specification Name for more information.
Another possibility is to tell DriveWorks to use the result of the rule as a prefix, for example:
| Assembly Structure | File Name Rule | Result (when Specification 18 is created) |
|---|---|---|
| MyAssembly | "*"&DWSpecification&"*" | MyProject 0018 MyAssembly |
| MyPartA | "*"&DWSpecification&"*" | MyProject 0018 MyPartA |
| MyPartB | "*"&DWSpecification&"*" | MyProject 0018 MyPartB |
| See Model File Name Rule and Drawing File Name Rule for more information. | ||
Here the * is used, first at the start of the rule, to remove the original file name; and then at the end of the rule to append the original file name.
DWSpecification is a special variable, see Specification Name for more information.
It is also possible to tell DriveWorks not to use the original file name at all, for example:
| Assembly Structure | File Name Rule | Result (when Specification 18 is created) |
|---|---|---|
| MyAssembly | "*A-"&DWSpecification | A-MyProject 0018 |
| MyPartA | "*PA-"&DWSpecification | PA-MyProject 0018 |
| MyPartB | "*PB-"&DWSpecification | PB-MyProject 0018 |
| See Model File Name Rule and Drawing File Name Rule for more information. | ||
Original File Name
When removing the original file name it is important to include something that differentiates the file name of each generated model.
If each component in the assembly results in exactly the same file name that one component will replace every other component in the generated assembly.
DWSpecification is a special variable, see Specification Name for more information.
It is also possible to use an intelligent naming convention. This will allow DriveWorks to re-use a file that has previously been created when the Relative Path is set to a common folder.
The top level assembly will still require a unique name, otherwise nothing could be generated.
But all sub-assemblies and parts can be assigned an intelligent naming convention.
When using intelligent file names it is important to combine all the parameters that affect the outcome of the model into the name.
This ensures that DriveWorks will re-use the correct component when needed.
| Assembly Structure | File Name Rule | Result (when Specification 18 is created) |
|---|---|---|
| MyAssembly | "*A-"&DWSpecification | A-MyProject 0018 |
| MyPartA | LengthReturn &" Long X"& DWVariableHeight &" High" | MyPartA 2745 Long X 698 High |
| MyPartB | "*PB-"&HashMD5(LengthReturn&DWVariableHeight) | PB-C48CEAEBA9E04137B8E201A8D5DA8559 |
| See Model File Name Rule and Drawing File Name Rule for more information. | ||
When adopting intelligent file naming to enable file re-use it is important to set the Relative Path to a common location.
This applies to models and drawings.
| Assembly Structure | Relative Path Rule (Model) | Result |
|---|---|---|
| MyAssembly.sldasm | DWSpecification | Will create the part in the unique folder MyProject 0018 when Specification 18 is created |
| MyPartA.sldprt | "Common Parts\A" | Will create the part in the folder "Common Parts\A" |
| MyPartB.sldprt | "Common Parts\B" | Will create the part in the folder "Common Parts\B" |
| See Model Relative Path Rule for more information. | ||
| Drawing Structure | Relative Path Rule (Drawing) | Result |
| MyAssembly.slddrw | DWSpecification | Will create the drawing in the unique folder MyProject 0018 when Specification 18 is created |
| MyPartA.slddrw | "Common Parts\A" | Will create the drawing in the folder "Common Parts\A" |
| MyPartB.slddrw | "Common Parts\B\Drawings" | Will create the drawing in the folder "Common Parts\B\Drawings" |
| See Drawing Relative Path Rule for more information. | ||