Home Search

DriveWorks Pro 22
Replace Component

Send Feedback

Replace Component

Replaces a component within the current model.

This task allows the replacement of:

  • Parts for parts
  • Parts for assemblies
  • Assemblies for assemblies
  • Assemblies for parts
Components of the same name AND type cannot be swapped, even when they exist in different locations.

Components with the same name but different type can be swapped.

For example:

/source/componentA.sldprt cannot be replaced with /target/componentA.sldprt

/source/componentA.sldprt can be replaced with /target/componentA.sldasm


(Name)The unique name for this task.
Component NameThe name of the top level component in the assembly to be replaced, including its instance number.
Replacement File PathThe replacement file path including its extension. This can be a full path, otherwise it will be considered relative to the driven assembly path.
Configuration MatchUse specified configuration name or let SOLIDWORKS attempt to match configurations of the old component with a configuration in the replacement component.
Configuration NameThe name of a configuration in the replacement component. The components default configuration will be used if left empty.


Instance Name Syntax

Instances are suffixed immediately after the component name (no space), with a dash and then the instance number.

For example:

For a component that appears in the SOLIDWORKS Feature Manager (after DriveWorks Model Generation) as - Part1 MyProject 0004<1>

Would be referenced as:

Part1 MyProject 0004-1

Instance Order

This task is easier to implement if instances are listed in numeric order in the SOLIDWORKS Feature Manager.

For example:

Instance <1> - is the first instance.

Instance <2> - is the second instance.

Instance <3> - is the third instance.

Unordered instances are renumbered, by SOLIDWORKS, when the assembly is driven.

If instances do not follow an order we recommend generating a new clone and noting the new instance numbers to be driven.

Property NameExample RuleExample ResultMeaning
Configuration MatchUseSpecifiedWill use the Configuration specified in the Configuration Name property.

When this property is set to MatchName, the configuration of the replacement file will be switched to match the configuration of the file to be replaced (if it exists).

Configuration NameColorReturnRedWill switch the configuration in the replacement file to the configuration named Red
Component Name"Bracket " & DWSpecification & "-2"Bracket Canopy Assembly 0006 -2Will replace the second (-2) instance in the assembly.
Replacement File Path"D:\DriveWorks\Part2.SLDPRT"D:\DriveWorks\Part2.SLDPRTWill use this file as the replacement file.

Generation Sequence

This Task can be added to the following Generation Sequence(s):

  • Pre Drive (will be run before the Main Drive Sequence)
  • Post Drive (will be run after the Main Drive Sequence)