Home Search

DriveWorks Solo 23
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 Name (Suffixed)

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

Simple File Name (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
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.

Absolute File Name

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
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.

Intelligent File Name

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 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
See Model File Name Rule and Drawing File Name Rule for more information.

Relative Path

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 StructureRelative Path Rule (Model)Result
MyAssembly.sldasmDWSpecificationWill 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 StructureRelative Path Rule (Drawing)Result
MyAssembly.slddrwDWSpecificationWill 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.