Home Search

DriveWorks Pro 22
Set Document Node Static Transform

Send Feedback

Set Document Node Static Transform

The Set Document Node Static Transform task will modify the transform of a Node in a DriveWorks 3D Document.

A Nodes Transform includes the Nodes Position (X, Y, Z), as well as Rotation (X, Y, Z) and its Scale (X, Y, Z). This Specification Macro Task can set each of these values on a Node.

From a Macro Button or a 3D Model Click Macro you can position a Model/Node using this task.

The Set Document Node Static Transform 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 for performance.

The Set Document Node Static Transform task does NOT work on 3D Previews created from SOLIDWORKS and 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.
Target Node AddressThe address of the Node to target.
Set World PositionTRUE to set the world position, FALSE to set the local position.
Position ValuesA pipe delimited list of position values in the format X|Y|Z.

This defaults to 0|0|0 when the Task is added.

Set World RotationTRUE to set the world rotation, FALSE to set the local rotation.
Rotation ValuesA pipe delimited list of rotation values in the format X|Y|Z.

This defaults to 0|0|0 when the Task is added.

Scale ValuesA pipe delimited list of scale values in the format X|Y|Z.

This defaults to 1|1|1 when the Task is added.

Include Transform RulesTRUE to set the transform with rules applied, FALSE to set the static transform.

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 set the Transform of the specified Node.
Target Node Address"Root\Table\Leg-" & DWConstantSelectedLegRoot\Table\Leg-1This is the address of the Node to set the Transform on.
Get World Transform"TRUE" or "FALSE"This is the position of the specified Nodes parents that will be included in the Position Values data output.
Get World Rotation"TRUE" or "FALSE"This is the rotation of the specified Nodes parents that will be included in the Rotation Values data output.
Position ValuesXPositionReturn & "|0|" & ZPositionReturn1000|0|500This sets the Node to be 1000 in the X Axis and 500 in the Z Axis.
Rotation Values"0|" & YRotationReturn & "|0"0|45|0All rotations will remain at 0 degrees apart from in the Y Axis. Units in degrees.
Scale Values"1|1|1"1|1|1The Scale of the Node will remain at 1 in each Axis. This leaves the model at its normal size.
Include Transform Rules"TRUE" or "FALSE"TRUE to set the transform with rules applied, FALSE to set the static transform.

Node Address

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.

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

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

  • Successfully applied new static transform to Node.

Success with Warnings

  • N/A - should never be fulfilled

Failed(One of the following occured)

  • 3D Preview control not found.
  • Couldn't find an existing preview, preview must be previewing a model.
  • Unable to find target node at address.
  • General error - see the Specification report for more information.