Home Search

DriveWorks Pro 21
Duplicate Document Node

Send Feedback

Duplicate Document Node

The Duplicate Document Node task will duplicate a Node within a DriveWorks 3D Document.

The Node to duplicate must already exist in the DriveWorks 3D Document. The duplicated Node must also not exist at the level you are duplicating it to. Each Node must have a unique name at each Node level.

The task will duplicate a Node to a new address with the name specified in the task. All child Nodes will be duplicated, including any Entities add to each Node.

The Duplicate Document Node task works on a 3D Document within a 3D Preview Control. In order to save changes made by this task you will need to use the Save 3D Document task.

It is advised that you use the Save 3D Document task at the end of a Specification.

This task does NOT work on 3D Previews created from SOLIDWORKS with DriveWorks Autopilot, or static DriveWorks 3D Files.

Properties

Property NameDescription
Preview Control NameThe name of a 3D Preview Control to perform the action on.
This 3D Preview Control must be using a DriveWorks 3D Document.
Source Node AddressEnter the Node address, within the DriveWorks 3D Document, of the Node you want to duplicate.
Target Node AddressEnter the Node Address, including Node name, of the target Node. This is the new name of the duplicated Node and its new address.

Example

When this task is added the properties are static by default.
See How To: Change A Static Property To A Dynamic Property to enable rules to be built on these properties.

Property NameExample ruleExample resultMeaning
Preview Control Name"3DPreviewControl"3DPreviewControlThis task will run on the named Preview Control. If that Preview Control has a DriveWorks 3D Document, then the task will attempt to duplicate the specified Node.
Source Node Address"Root\Table\Leg-" & LegReturnRoot\Table\Leg-1This task will duplicate the Node called Leg-1 in the 3D Document on the control called 3D Preview Control.
Target Node Address"Root\Table\Leg-" & LegReturn + 1Root\Table\Leg-2This task will then create a Node called Leg-2 in the 3D Document on the control called 3D Preview Control.

Node Addresses

All Node Addresses start from the "Root" Node in the DriveWorks 3D Document. This "Root" Node can be renamed, so you may need to enter the renamed Node name.

Example:

Root
Table
Leg-1
LegModel
Foot

If you want to duplicate the model "Leg-1" you need to specify its address. To duplicate Leg-1 you would use the following Source Node Address:

Root\Table\Leg-1

Your Target Address would be as follows:

Root\Table\Leg-2

Leg-2 is the name of duplicated Node. You will end up with the following tree structure:

Root
Table
Leg-1
LegModel
Foot
Leg-2
LegModel
Foot

The address is a hierarchical path and you need to know the address of the model you are duplicating.

DWCurrentMacroCaller can be used when clicking a 3D Model in a DriveWorks 3D Document. This Special Variable will return the address of the model clicked.

Using the Task in a Specification Macro

This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.

Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:

Success

  • Task ran succesfully.

Success with warnings.

  • Target Node didn't exist - new Node was created

Failed (one of the following occurred)

  • Unable to find 3D Preview Control.
  • Preview control must be previewing a 3D document.
  • Unable to find Node at address provided.
  • Target Node address is invalid.
  • Target Node is not rooted.
  • Node with name already exists.
  • General error - see Specification report for more information.