Home Search

DriveWorks Pro 22
Export Variables Listed In A Table To A Text File

Send Feedback

Export Variables Listed In A Table To A Text File

This task will export the required variable names and their respective values to a text file.


Property NameDescription
TitleChanges the Title (not the name) of the task.
Table NameName of the table containing the list of variables.
Export PathFull path, file name and extension, of the file that the Variables will be exported to.
Write HeadersTRUE to write VariableName and AliasName as Headers in the text file.


When this Task is added the properties are static. To be able to build rules on a static property see How To: Change A Static Property To A Dynamic Property.

Property NameExample RuleExample ResultMeaning
Table Name"VariableExport"VariableExportThis is the name of the Table that contains the list of Variables that will be exported.
Export Path"C:\MYDocument\Export\VariableExport.txt"C:\MYDocument\Export\VariableExport.txtThis is the full file path, file name and extension for where the exported file will be created.
Another common file extension that could be used is a .csv (comma delimited) format.
Write HeadersTRUETRUEThis will include the headers Name and Value in the created Text file.

Example Table - Single Column

The following single column table will export the variables exactly as they are named.


The text file created will look like:

Created Text File




Material,Galvanized Steel



Example Table - Two Column

Variable aliases can be assigned by using a two column table. This is useful if the name given to the variable in DriveWorks needs to be changed in the outputted file.

VariableVariable Alias
BayLengthLength of Bay
SheetLengthLength of Sheet
CostTotal Cost

The text file created will look like:

Created Text File


Length of Bay,2080.5

Length of Sheet,2400

Material,Galvanized Steel


Total Cost,408.75

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:


  • Variables exported successfully.

Success with Warnings

  • N/A - should never be fulfilled.

Failed (one of the following occurred)

  • Export Path cannot be empty.
  • Table Name cannot be empty.
  • Simple Table does not exist.
  • Error exporting variables into the file.
  • General failure - Check the Specification report for more details.