Home Search

DriveWorks Solo 22
Concept: File Naming

Send Feedback

File Naming

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:

Simple File Names (Suffixed)

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 StructureFile Name RuleResult (when Specification 18 is created)
MyAssemblyDWSpecificationMyAssembly MyProject 0018
MyPartADWSpecificationMyPartA MyProject 0018
MyPartBDWSpecificationMyPartB MyProject 0018

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

DWSpecification is a Special Variable.

By default the Specification Name rule results in the name of the project with the SpecificationID formated to 4 leading numbers.

Simple File Names (Prefixed)

Another possibility is to tell DriveWorks to use the result of the rule as a prefix, for example:

Assembly StructureFile Name RuleResult (when Specification 18 is created)
MyAssembly"*"&DWSpecification&"*"MyProject 0018 MyAssembly
MyPartA"*"&DWSpecification&"*"MyProject 0018 MyPartA
MyPartB"*"&DWSpecification&"*"MyProject 0018 MyPartB

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.

Absolute File Names

It is also possible to tell DriveWorks not to use the original file name at all, for example:

Assembly StructureFile Name RuleResult (when Specification 18 is created)
MyAssembly"*A-"&DWSpecificationA-MyProject 0018
MyPartA"*PA-"&DWSpecificationPA-MyProject 0018
MyPartB"*PB-"&DWSpecificationPB-MyProject 0018
Original File Name

When removing the original file name it is important to include something that differentiates each model being built.

If this is not done you will end up with an assembly full of exactly the same components.

Intelligent File Names

It is also possible to use an intelligent naming convention. This will allow DriveWorks to re-use a file that has previously been created.

The top level assembly will still require a unique name, if not nothing at all could be generated. But all sub-assemblies and parts can be assigned an intelligent naming convention.

Assembly StructureFile Name RuleResult (when Specification 18 is created)
MyAssembly"*A-"&DWSpecificationA-MyProject 0018
MyPartALengthReturn &" Long X"& DWVariableHeight &" High"MyPartA 2745 Long X 698 High
MyPartB"*PB-"&HashMD5(LengthReturn&DWVariableHeight)PB-C48CEAEBA9E04137B8E201A8D5DA8559
Intelligent File Names

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.