DriveWorks Pro 15: DriveWorks 3D File [send feedback...]

DriveWorks 3D File

The DriveWorks 3D File document type references .drive3d files created using your 3D CAD application.

The document can be displayed in the 3D Preview control to allow a configurable 3D representation, optimized for internet browsers, on a user form.

A DriveWorks 3D Document can assemble models together to create assemblies or layouts in 3D. Appearances, Textures, Scale and lighting can all be dynamically driven.

This can all be done without the need for SOLIDWORKS.

Add a DriveWorks 3D File Document

In DriveWorks Administrator open the project and go to Stage4: Output Rules> Documents

  1. Click the Add button on the command bar to launch the Create Document wizard.
  2. Choose the required document type from the Documents list in the Create Document wizard.
  3. Enter a name for the document in the field below the Documents list.
  4. Click "Next".
  5. Note this step is optional - A .drive3d file can be added to the document later.

    Click the Browse button at the end of the Master DriveWorks 3D File field and browse to the location of the .drive3d file that is to be added as a document.

    Please see How To: Create a Drive3D File for information on creating a drive3d file to add to the document.

    Click "Open" in the Open dialog.

  6. Click "Finish" in the Create Document dialog.

Once the Document has been added the Document Properties window opens.

When changing the Master File, any rules applied in the Output File and Captured Properties sections will be removed.

To Edit a DriveWorks 3D File Document

Please see the topic How To: Create Appealing DriveWorks 3D files for more information.

Once the document has been added, Edit mode is automatically activated.

To re-edit a DriveWorks 3D Document:

  1. Select the required DriveWorks 3D Document from the document list.
  2. Select Edit from the command bar.

The DriveWorks 3D Document editor will open.

The DriveWorks 3D Document Editor is split into several sections:

  • Options Panel
  • Feature Panel
  • 3D Space
  • Parameter Panel
  • Information Panel

Options Panel

This allows the following options, for the resulting DriveWorks 3D Document, to be controlled.

Document Name

This is the name of the new document to be created.

To Build a File Name Rule

The rule for the File Name of the new document is built by:

  1. Click the Build button at the end of the File Name Rule field
  2. Enter a name for the document in the Rule Builder

Document Path

This is the location to store the new document when it is created.

To Build a Path Rule

The rule for the path to store the new document is built by:

  1. Click the Build button at the end of the Path Rule field
  2. Enter a qualified path in the Rule Builder that will be the location of the new document.

Path Rule Examples

RuleMeaning

If no file path is specified the document will be located at the location specified by the settings Default Specification Folder and Specification Path to form the location:

Default Specification Folder \ Specification Path

"..\Documents"

Will go back a level (..\) from the Project location and place the new document in a folder named Documents.

If the Documents folder does not exist DriveWorks will create it when the document is created
"F:\DriveWorks\" & CustomerReturn & "\" & DWVariableOrderNumber & "\Documents"Will create the document on the network drive F:\DriveWorks. From this point the folder structure calculated by the input Customer, the variable OrderNumber and \Documents will be created.
"\\FileServer\DriveWorks\" & CustomerReturn & "\" & DWVariableOrderNumber & "\Documents"Will create the document on the UNC path \\FileServer\DriveWorks. From this point the folder structure calculated by the input Customer, the variable OrderNumber and \Documents will be created.

Create Drive3D

When checked DriveWorks will create a .drive3D file.

The .drive3D file will only be created when the specification transitions to a state where the Release Documents task is used.

Hide From Document List

When this setting is enabled (by checking the box) the document will be hidden from the Documents list in the Specification Explorer.

Feature Panel

Please see the topic How To: Create Appealing DriveWorks 3D files for more information.

The Feature Panel displays all the elements of the 3D Document.

Further elements can be added by right clicking on some of the default features.

  • Selecting a feature (highlighting) will display parameters of that feature that can be manipulated in real time; these appear in the Information Panel to the right of the 3D Space.
  • Selecting a feature (checking the selection box) will display parameters of that feature that can have rules applied; these appear in the Parameters Panel below the 3D Space.

Environment

Information Panel

Parameters in the Information Panel will be locked if rules have been applied to the corresponding value in the Parameter Panel.

With Environment selected in the Feature Panel the following will be displayed in the Information Panel:

  • Use environment map

    Checking this allows Map Lighting and Sky Box to be set.

    • Use environment map lighting

      Will use the default lighting applied to the environment.

    • Display sky box

      Will display the sky scene around the model.

  • Background Color

    Sets the color to use for the background (not applicable when using sky box).

    Will apply a hexadecimal value to the Background Color in the Parameter Panel.

    • Red - a number from 0 to 255
    • Blue - a number from 0 to 255
    • Green - a number from 0 to 255
    • Alpha - (Transparency) a number from 0 to 255
  • Ambient Light Color
    • Red - a number from 0 to 1
    • Green - a number from 0 to 1
    • Blue - a number from 0 to 1
    • Intensity - a number from -x to +x

Parameter Panel

Changes made to values in the Information Panel will update the results in the Parameters Panel, unless rules have been applied.

With Environment checked in the Feature Panel the following will be displayed in the Parameters Panel:

  • Use environment map

    True to allow Map Lighting and Sky Box values to be honored.

    • Use environment map lighting

      True use the default lighting applied to the environment.

    • Display sky box

      True to display the sky scene around the model.

  • Background Color

    Sets the color to use for the background (not applicable when using sky box).

    Requires a hexadecimal value.

  • Ambient Light Color
    • Red - a number from 0 to 1
    • Green - a number from 0 to 1
    • Blue - a number from 0 to 1
    • Intensity - a number from -x to +x

Assets - Source Files

The Source Files folder contains the master drive3d file used in the document.

The document requires access to the master file in order to extract geometry.

Information Panel

With the Source File selected in the Feature Panel the following will be displayed in the Information Panel:

  • Source File Path

Click the Browse button to relocate the source file.

Parameter Panel

There are no parameters to display for this feature.

Assets - Appearances

Model appearances can be added, edited, deleted and merged. Initially these appearances will be taken from imported Drive3D files.

Information Panel

With an Appearance selected in the Feature Panel the following will be displayed in the Information Panel:

  • General
    • Name - Displays the name of the currently selected appearance.
    • Ambient Intensity - a number from -x to +x
    • Reflectivity - a number from 0 to 100.
  • Diffuse Color

    Sets the color to use for the diffuse.

    Will apply a hexadecimal value to the Diffuse Color in the Parameter Panel.

    • Red - a number from 0 to 255
    • Blue - a number from 0 to 255
    • Green - a number from 0 to 255
    • Alpha - a number from 0 to 255
    • Intensity - a number from -x to +x
  • Specular Color

    Sets the color to use for the specular.

    Will apply a hexadecimal value to the Specular Color in the Parameter Panel.

    • Red - a number from 0 to 255
    • Blue - a number from 0 to 255
    • Green - a number from 0 to 255
    • Intensity - a number from -x to +x
  • Texture
    • Texture - Select from the list of available textures.
    • Scale X - a number from 0 to 100.
    • Scale Y - a number from 0 to 100.
    • Angle - a number from 0 to 360

Parameter Panel

With an Appearance checked in the Feature Panel the following will be displayed in the Parameter Panel:

  • Ambient Intensity - a number from -x to +x
  • Reflectivity - a number from 0 to 100.
  • Diffuse Color - Sets the color to use for the diffuse. Requires a hexadecimal value.
  • Diffuse Intensity - a number from -x to +x
  • Specular Color - Sets the color to use for the specular. Requires a hexadecimal value.
  • Specular Intensity - a number from -x to +x
  • Texture Name - The name of an available texture to use.
  • Texture Scale X - a number from 0 to 100.
  • Texture Scale Y - a number from 0 to 100.
  • Texture Angle - a number from 0 to 360

To Add an Appearance

  1. Right click on the Appearance folder.
  2. Select Add Appearance.
  3. Enter a name for the appearance.
  4. Click OK

Once a new appearance has been added values for the parameters above can be applied.

Assets - Geometries

Geometries are shown here to give the opportunity to remove the texture coordinates applied to the Drive3D file when it was exported from the CAD system. Texture coordinates determine how a texture wraps onto your model. Enter "boxmap" to recalculate.

Information Panel

With a Geometry selected in the Feature Panel the following will be displayed in the Information Panel:

  • Texture Mapping Mode - Select from Source or BoxMap

    Source will use the texture mapping information from the source the file was created.

    BoxMap will use DriveWorks texture mapping (planar mapping).

Parameter Panel

With a Geometry checked in the Feature Panel the following will be displayed in the Parameter Panel:

  • Texture Mapping Mode - Result should be either Source or BoxMap

    Source will use the texture mapping information from the source the file was created.

    BoxMap will use DriveWorks texture mapping (planar mapping).

Assets - Suppression States

Suppression states allow multiple models to be suppressed with each suppression state rule. The Suppression state rule result should be True or False. The name of the suppression state can then be used in the "Is Suppressed" rule for each model.

Information Panel

With an Suppression State selected in the Feature Panel the following will be displayed in the Information Panel:

  • Is Suppressed - check to suppress the state

Parameter Panel

With an Suppression State checked in the Feature Panel the following will be displayed in the Parameter Panel:

  • Suppressed - True to suppress the state

To Add a Suppression State

  1. Right click on the Suppression State folder.
  2. Select Add Suppression State.
  3. Enter a name.
  4. Click OK.

Root

When a drive3d file has been applied to the document this folder will display all the components of the drive3d file.

To Add a drive3d File:

  1. Right click the Root node.
  2. Select Add Import.
  3. Browse to and select the drive3d file to add.
A drive3d file can be imported onto a node of the Root.

See To add a node below.

To Add a Node:

  1. Right click the Root node.
  2. Select Add Node.
  3. Enter a name for the node and click OK.
Nodes can have a drive3d imported onto them (see To add a drive3d file above).

Nodes can also have Entities added to them (see To Add an Entity below).

To Add an Entity

The following Entities can be added to a node:

  • Replace Model - Will add Replacement Model parameters to the Information and Parameter Panels:
    • Replacement File Path - Result should be a full path and name of the drive3d file to replace the original with.
    • Texture Mapping Mode - Result should be either Source or BoxMap

      Source will use the texture mapping information from the source the file was created.

      BoxMap will use DriveWorks texture mapping (planar mapping).

  • Click Macro - Will allow a macro to run when the node is clicked in the 3D Preview Box control.
    • Macro Name - The name of a Specification Macro to run:

      Examples

      Macro Name Property ValueResult
      "Cancel"Runs the macro named Cancel.
      IF(ResetFormReturn=True,"DriveControl","")Runs the macro named DriveControl when the control ResetForm is True.
    • Macro Argument

      The value or result of a rule, placed in the Macro Argument property, is passed into the special variable Current Macro Argument (see Info: Special Variables).

      Using the Macro Argument property allows the same macro to be used, but with differing outcomes depending on when it is run.

      Examples

      Macro Argument ValueResult
      1Will pass the value 1 into the special variable Current Macro Argument.
      "Type A"Will pass the text Type A into the special variable Current Macro Argument.
      DWVariableTotal * QtyReturnWill pass the result of DWVariableTotal multiplied by QtyReturn into the special variable Current Macro Argument.
  • Directional Light - Will add Directional Light parameters to the Information and Parameter Panels
    • Red Intensity - a number from 0 to 1
    • Green Intensity - a number from 0 to 1
    • Blue Intensity - a number from 0 to 1
    • Intensity - a number from -x to +x
  • Point Light - Will add Point Light parameters to the Information and Parameter Panels
    • Red Intensity - a number from 0 to 1
    • Green Intensity - a number from 0 to 1
    • Blue Intensity - a number from 0 to 1
    • Intensity - a number from -x to +x
    • Falloff Exponent - a number from -x to +x
  • Remap Appearance - Will add Remap parameters to the Parameter Panel
    • Map String - This specifies that one or more appearances should be replaced with a single appearance.

      All matching appearances under where this is applied will be replaced.

      E.g. The value "PrimaryColor|Color1" will change all appearances called "PrimaryColor" to be the appearance called "Color1".

      If you all appearances are to be replaced then use the value "*|Color1" (or "Color1").

  • Spot Light - Will add Spot Light parameters to the Information and Parameter Panels
    • Red Intensity - a number from 0 to 1
    • Green Intensity - a number from 0 to 1
    • Blue Intensity - a number from 0 to 1
    • Intensity - a number from -x to +x
    • Falloff Exponent - a number from -x to +x
    • Falloff Start Angle - a number from 0 to 360
    • Falloff End Angle - a number from 0 to 360

Information Panel

With a node selected in the Feature Panel the following will be displayed in the Information Panel:

  • Node
    • Is Suppressed - check to suppress the node.
  • Model
    • Geometry - Select the geometry to apply values for.
    • Override Appearance - Select the appearance to use on the geometry.
  • Transform
    • Position
      • X - controls the X position of the node.
      • Y - controls the Y position of the node.
      • Z - controls the Z position of the node.
      Models can be moved directly in the 3D Preview Box control by using these parameters.

      Additionally, when in a specification, models can be placed by clicking in the 3D space when the special variable DWTouchPointHitPosition is used.

    • Scale
      • X - controls the X scale of the node.
      • Y - controls the Y scale of the node.
      • Z - controls the Z scale of the node.
    • Rotation
      • X - controls the X rotation of the node.
      • Y - controls the Y rotation of the node.
      • Z - controls the Z rotation of the node.
    • Prevent Values Changing (Test Mode) - When checked will toggle the spin buttons (at the end of each parameter) to spring back to the original value when released.

Parameter Panel

With a node selected in the Feature Panel the following will be displayed in the Information Panel:

  • Is Suppressed - check to suppress the node.
  • X Position - a value for the X position of the node.
  • Y Position - a value for the Y position of the node.
  • Z Position - a value for the Z position of the node.
  • X Scale- a value for the X scale of the node.
  • Y Scale- a value for the Y scale of the node.
  • Z Scale- a value for the Z scale of the node.
  • X Rotation- a value for the X rotation of the node.
  • Y Rotation- a value for the Y rotation of the node.
  • Z Rotation- a value for the Z rotation of the node.
  • Override Appearance Name - the name of the appearance to use.

3D Space

When a drive3d file has been added it will be displayed in the 3D Space.

This is how the file will be viewed when applied to the 3D Preview Box control.

The model view can be controlled with the mouse by:

  • Rotate - left click and drag.
  • Zoom - mouse wheel.
  • Pan - mouse wheel click and drag.
Without a .drive3D model appliedWith a .drive3D model applied

DriveWorks Tech Tips Portal

3D Preview - Dynamic

This Tech Tip demonstrates how to use a DriveWorks 3D Document with pre-created files.

View all Tech Tips

3D Preview - Mixed Mode

This Tech Tip combines a number of different 3D Preview methods. It uses static files within 3D Documents along with Previewed Models generated from SOLIDWORKS.

View all Tech Tips

3D Preview

Set up a 3D Preview control on your form, allowing you to display 3D Models on your form.

View all Tech Tips

DriveWorks Tech Tips Portal is available to DriveWorks Pro customers with an active subscription and support contract.

Tech Tips provide cut down projects that highlight specific functionality for faster and more effective learning.

To access the portal:

  1. Go to https://hub.driveworks.co.uk/tech-tips/
  2. Login with your DriveWorks Pro account credentials, if asked
  3. Click the Visit Tech Tips Portal button for access

The portal provides a search facility, start typing the name of the Tech Tip (as indicated above) to display the Tip you require.

Table of Contents