Export: Device Data CSV (EXPDEV via script) is a system-level file export command that triggers the FMS service to export device data for a particular date range as a .csv file, in Device (D) time format. For each eligible device the command resolves to, the service will gather the specified device data from the database, within the specified date range, and export it as a .csv file to a specified directory location. The directory location is relative to the host machine.
In conjunction with the .csv file, an export definition file (.edf) is used to specify the proper file definition type for the export. This file defines details about how to export the items in your device data .csv file out of FMS and how to format the file. See Using an Export Definition File for more information about configuring this file.
Note: This command is available only via the Master Scheduling Service in CygNet Explorer or via scripting (not through the FMS Explorer user interface).
You must have proper security authorization to execute this command. See FMS Security (and CMDSYS security event) for information about configuring security access for FMS commands.
See Scheduling FMS Command Tasks in the MSS for more information about scheduling commands.
See CxFms for more information about scripting commands.
The following command definition properties apply to Export: Device Data CSV commands, when scheduling, creating, or editing commands via CygNet Explorer.
| Property | Description |
|---|---|
|
FMS service |
Select a Site.Service for the command from the available FMS service list in the drop-down menu. |
|
Command |
Select the desired Command name from the drop-down menu. See FMS Commands for more information about available command types. |
|
Priority |
Select a processing queue Priority for the command from the drop-down menu. Options from least to greatest priority are as follows.
Default value is Low level processing queue priority. |
|
Logging |
Select a Logging level for the command results from the drop-down menu. Options are as follows.
Default value is Low level logging when scheduling a command via the MSS service in CygNet Explorer. Default value is High level logging when creating or running an ad-hoc command in FMS Explorer or via the FMS service in CygNet Explorer. |
The following command parameters apply to Export: Device Data CSV commands, when scheduling, creating, or editing commands via CygNet Explorer or scripting.
| Parameter | Description | Type | Usage Notes |
|---|---|---|---|
|
ExStDate |
Start date |
Date |
Double-click to access the Select Start Date dialog box. Select the starting date of the range for which to export data. See Notes* below this table. See Selecting Date and Time for more information. This parameter is required. |
|
ExEndDate |
End date |
Date |
Double-click to access the Select End Date dialog box. Select the ending date of the range for which to export data. See Notes* below this table. See Selecting Date and Time for more information. This parameter is required. |
|
ExPath |
Directory to export file |
File Directory |
Double-click to access the Enter Directory to Export File dialog box. Type the directory location for the CSV export file into the text box or click ... to access the Browse for Folder dialog box, and browse to the directory location. Note: The directory specified is relative to the computer hosting the FMS service. See Notes ** below this table. This parameter is required. |
|
ExFileNm |
Name of export file |
String |
Double-click to access the Select Name of Export File dialog box. Type a file name into the text box and/or use tokens to define a CSV export file name. See Notes *** below this table. This parameter is required. |
|
DevFileDef |
Dynamic String Enum |
Double-click to access the File Definition Type dialog box. Select the type of the .edf file to reference for the export, from the options in the drop-down menu. Note: The list is populated by the types defined in the .edf file (export definition file), for example, hourly, daily, raw records. See Using an Export Definition File for more information. This parameter is required. |
|
|
DevColHead |
Include column header |
String Enum |
If used, double-click to access the Include Column Header dialog box. Select one of the following options.
If set to Yes, the column header row will be shown in the export file. If set to No, the column header row will not be shown in the export file. This parameter is optional. Default value is Yes. |
|
RptUnitSet |
Unit set |
Dynamic String Enum |
If used, double-click to access the Unit Set dialog box. Select the name of the unit set to use from the options in the drop-down menu. Note: The list is populated by the unit sets defined in the service. The unit set selected will be used for the device data. See Configuring Unit Set Definitions for more information. This parameter is optional. *Notes: If you do not specify the unit set with this parameter, the unit set value must be specified in the .edf file. If you specify the unit set with this parameter AND in the .edf file, the value specified in the .edf file prevails, and overrides this setting. |
*Notes:
* Start/End dates - Make sure that the time window you request is relative to the computer hosting your FMS Service. There is no timestamp conversion between the parameters specified in the command and the data in the database. Data will be included in the export from the start of the “Start date” contract day through the end of the “End date” contract day.
** Directory to export CSV file - Make sure that you are cognizant of the system in which you are specifying the file location. The file location selected when you Browse For Folder will be relative to your local computer file system, whereas the file location generated when the command is executed will be relative to the computer hosting your FMS Service, which could be a separate system.
*** Name of CSV export file - Make sure that the specified file name does not already exist in the specified destination, or it will be overwritten by this command and could cause accidental data loss. File name collision will not be detected for this command.
You can use text, tokens, or both, to define a CSV export file name in the MSS. A token is a text string enclosed by percent signs (%sampletext%), that represents a described value. The token will be replaced with the value it represents. Tokens are used several places in CygNet Software to define dynamic text substitutions, as described for the specific usage.
To Define a CSV Export File Name in the MSS

More:
Using an Export Definition File
Supported Tokens for Device Data CSV Exports