COM Automation API
Overview
Start with the generated Overview page for the top-level API introduction and examples.
Start with the generated Overview page for the top-level API introduction and examples.
GEMS Dash Design supports automation via a COM interface.
There is a dual interface; GEMS Dash Design can be automated by both an IDispatch style interface which supports late-binding languages such as Javascript and additionally via direct v-table style interfaces.
Interfaces:
IDashApplication
IDashOptionsMap
IDashJob
IDashDeviceList
IDashDevice
IDashCANPorts
See the IDashApplication documentation for code examples.
The following classes are available:
COM Application object. Supports the IDashApplication and IDispatch interfaces.
The following files are available:
Versioned Dash Design automation contracts and unattended upload rules.
Source code: View source
Browse the API reference by owner or alphabetically.
Total functions: 45
Total functions: 45
| Function | Description |
|---|---|
| IdentifierAt([in] unsigned int index, [out, retval] BSTR *retval) | Get an identifier for the port at the specified index in the port list. |
| NameAt([in] unsigned int index, [out, retval] BSTR *retval) | Get friendly name of the port at the specified index in the port list. |
| Refresh() | Refresh the ports list. Blocks execution until complete. |
| Function | Description |
|---|---|
| DownloadSetup([in] BSTR filename, [in, optional] VARIANT options, [out, retval] IDashJob **retval) | Start a setup download for this device. |
| EraseLog([in, optional] VARIANT options, [out, retval] IDashJob **retval) | Start an Erase Log operation for this device. |
| UploadFirmware([in] BSTR filename, [in, optional] VARIANT options, [out, retval] IDashJob **retval) | Start a firmware upload for this device. |
| UploadSetup([in] BSTR filename, [in, optional] VARIANT options, [out, retval] IDashJob **retval) | Start a setup upload for this device (programs opened setup into the device). |
| UploadSetupUnattended([in] BSTR filename, [in, optional] VARIANT options, [out, retval] IDashJob **retval) | Upload a setup without interactive prompts. |
| Function | Description |
|---|---|
| DescriptionAt([in] int index, [out, retval] BSTR *retval) | Gets the description of the device at the given index. |
| Get([in] int index, [out, retval] IDashDevice **retval) | Gets a representation of the device at the given index. |
| IsUsbAt([in] int index, [out, retval] VARIANT_BOOL *retval) | Tests whether the device uses a physical USB connection. |
| NameAt([in] int index, [out, retval] BSTR *retval) | Gets the name of the device at the given index. |
| Refresh(void) | Rescan the system for the attached devices and update the list. |
| SerialNumberAt([in] int index, [out, retval] BSTR *retval) | Gets the serial number of the device at the given index. |
| UsbPidAt([in] int index, [out, retval] int *retval) | Gets the USB PID (Product ID) of the device at the given index. |
| UsbVidAt([in] int index, [out, retval] int *retval) | Gets the USB VID (Vendor ID) of the device at the given index. |
| Function | Description |
|---|---|
| Cancel(void) | Cancels the Job. |
| Wait(void) | Wait for the Job to complete. |
| Function | Description |
|---|---|
| GetProperty([in] BSTR name, [out, retval] VARIANT *retval) | |
| SetProperty([in] BSTR name, [in] VARIANT value) | properties are made available by the IDispatch interface (late-binding). |
IDashApplication automation interface.
Instances supporting this interface may be created using the Application coclass.
These examples create an instance and display its window. The application must be installed and its COM server registered on Windows. The C# example uses dynamic COM binding and does not require an imported interop assembly.
The JavaScript examples run with Windows Script Host, not in a browser. Save the chosen JavaScript example as automate.js and place this batch file in the same directory. The batch file works from any current directory and returns the script’s exit code to its caller.
@echo off
cscript.exe //nologo "%~dp0automate.js"
exit /b %errorlevel%// Save as automate.js and run with the batch file above.
var obj = new ActiveXObject("GemsDashDesign.Application");
obj.Visible = true;
WScript.Echo(obj.Version);using System;
using System.Runtime.InteropServices;
var applicationType = Type.GetTypeFromProgID("GemsDashDesign.Application", throwOnError: true)!;
dynamic app = Activator.CreateInstance(applicationType)!;
try
{
app.Visible = true;
Console.WriteLine(app.Version);
}
finally
{
Marshal.FinalReleaseComObject(app);
}$ErrorActionPreference = 'Stop'
$app = New-Object -ComObject 'GemsDashDesign.Application'
try {
$app.Visible = $true
$app.Version
} finally {
[void][System.Runtime.InteropServices.Marshal]::FinalReleaseComObject($app)
}Dim obj
Set obj = CreateObject("GemsDashDesign.Application")
obj.Visible = True
WScript.Echo obj.Version// Direct COM interface.
::CoInitialize(NULL);
IDashApplication* iface = 0;
HRESULT hr = ::CoCreateInstance(
CLSID_Application,
NULL,
CLSCTX_LOCAL_SERVER,
IID_IDashApplication,
(LPVOID*)&iface);
if (iface) {
iface->put_Visible(TRUE);
iface->Release();
}
::CoUninitialize();// IDispatch interface.
::CoInitialize(NULL);
HRESULT hr;
CLSID clsid; // CLSID of ActiveX object.
LPUNKNOWN punk = NULL; // IUnknown of ActiveX object.
LPDISPATCH pdisp = NULL; // IDispatch of ActiveX object.
// Retrieve CLSID for GemsDashDesign.Application from the registry.
// This is {4CF7EE02-7183-4DF2-B0D9-751AEE62FC25} which could be
// used directly for better performance.
hr = CLSIDFromProgID(L"GemsDashDesign.Application", &clsid);
if (FAILED(hr)) {
return hr;
}
// Create an instance of the ActiveX object.
hr = CoCreateInstance(clsid, NULL, CLSCTX_SERVER,
IID_IUnknown, (void **)&punk);
if (FAILED(hr)) {
if (punk) punk->Release();
return hr;
}
hr = punk->QueryInterface(IID_IDispatch, (void **)&pdisp);
if (FAILED(hr)) {
punk->Release();
if (pdisp) pdisp->Release();
return hr;
}
punk->Release();
// << Use the dispatch interface..
pdisp->Release();
::CoUninitialize();| Property | Description |
|---|---|
| Version | Get application version. |
| ModulePath | Get application EXE path. |
| Visible | Displays/hides the Application UI. |
| FullScreen | Makes the window fullscreen (or not). |
| LastErrorString | Provides an error string describing the last method failure that occurred, if possible. |
| Setup | Not yet implemented. |
| Tabs | Not yet implemented. |
| SelectedDevice | Gets the currently selected device (if any). |
| CurrentTabID | Get / Set the current top-level tab ID. |
| CurrentSubTabID | Get / Set the current sub-level tab ID. |
| SimulatorRunning | |
| SimulatorProcessId | Running simulator host PID for native debugger attachment, or zero when stopped. |
| Function | Description |
|---|---|
| CreateOptionsMap | Create an instance of IDashOptionsMap that can be used to modify the behaviour of various functions that accept options. |
| InvokeAction | Invokes an action with the specified ID. |
| OpenSetup | Opens the setup specified by ‘path’. |
| SaveSetup | Saves the current setup by its current file name. |
| SaveSetupAs | Saves the current setup by a new file name. |
| NewSetup | Creates a new setup. |
| CreateDeviceList | Gets a list of the devices that are attached to the system. |
| GenerateHelpInfo | Generate Help Information as JSON. |
| EnumerateWindows | Enumerate Windows in the application. |
| TakeScreenShot | Take a screenshot of a window or the whole application. |
| CloseWindow | Close a window (if possible). |
| FocusWindow | Focus & raise a window (if possible). |
| SetProperties | Set mutiple properties on a window / view. |
| GetProperties | Get all properties from a window / view. |
| SetProperty | Set a single property on a window / view. |
| GetProperty | Get a single property from a window / view. |
| Click | Simulate a mouse click. |
| SetSimulationChannel | Set a simulator channel value. |
| ImportCanDbc | Import CAN DBC file. |
| Keyboard | Simulate a keyboard. |
| ListCANPorts | Obtains an interface for listing CAN adaptors connected to the PC. |
| BindSimuatorCANPort | Connect a physical CAN port to the simulator. |
| EmbedCdxModel | Embed a CDX Model package into the currently open setup (if editable + supported). |
| ConfigureSimulator | Configure the next simulator launch without starting it. |
| SupportsCdxModelImageDescriptor | Query implemented CDX Model image descriptor versions without loading a package. |
Get application version.
BSTR VersionGet application EXE path.
BSTR ModulePathDisplays/hides the Application UI.
BOOL VisibleThe UI will be hidden initially when creating an instance of GemsDashDesign.
Makes the window fullscreen (or not).
BOOL FullScreenSetting this value to TRUE causes the application window to take up the full screen without title bars etc.
When entering fullscreen mode via the COM Automation Interface, the popup ’toaster’ window giving users a way of exiting fullscreen mode is not displayed.
Provides an error string describing the last method failure that occurred, if possible.
BSTR LastErrorStringWehre appropriate, this string is also included in Error exception description strings as a result of IDispatch calls (e.g. when accessed via late binding as with JavaScript).
Not yet implemented.
IDispatch SetupIn future this will return an interface to the setup object which Offers more setup specific functionality than the Application interface.
Not yet implemented.
IDispatch TabsIn future this will return an interface that gives access/control of the list of tabs, tab groups, views within tabs etc.
Gets the currently selected device (if any).
IDashDevice SelectedDeviceMay return a NULL device.
Get / Set the current top-level tab ID.
BSTR CurrentTabIDGet / Set the current sub-level tab ID.
BSTR CurrentSubTabIDSome tabs have sub-tabs. This property allows you to get/set the current sub-tab where possible.
BOOL SimulatorRunning@breif Control the simulator running state.
Running simulator host PID for native debugger attachment, or zero when stopped.
ULONG SimulatorProcessIdCreate an instance of IDashOptionsMap that can be used to modify the behaviour of various functions that accept options.
HRESULT CreateOptionsMap([out, retval] IDashOptionsMap **options)It is also possoble to use JavaScript objects for options instead of an options map.
See Also: IDashOptionsMap
Invokes an action with the specified ID.
HRESULT InvokeAction([in] BSTR action_id, [in, optional] VARIANT options)If ‘deferred’ is specified and set to ’true’ then the function will defer the action invocation via the event loop and return immediately. In cases where the action would display a modal dialog or message box, using a deferred invocation avoids the caller from blocking. Deferred calls retain the application and snapshot their options until execution finishes.
Opens the setup specified by ‘path’.
HRESULT OpenSetup([in] BSTR path, [in, optional] VARIANT options)The user may be prompted to save any modified setup files. See IDashOptionsMap::SaveModifiedDiscard and IDashOptionsMap::SaveModifiedPrompt
Saves the current setup by its current file name.
HRESULT SaveSetup([in] VARIANT options)If the setup does not have a file name then the behaviour of this function will depend upon the ‘options’ parameter and may not be saved as a result.
See IDashOptionsMap::SaveModifiedDiscard and IDashOptionsMap::SaveModifiedPrompt
Saves the current setup by a new file name.
HRESULT SaveSetupAs([in] BSTR path, [in] VARIANT options)If the setup does not have a file name then the behaviour of this function will depend upon the ‘options’ parameter and may not be saved as a result.
See IDashOptionsMap::OverwriteAllow and IDashOptionsMap::OverwriteSilent
If options contains saveCopy = true, writes a copy without changing the open setup’s file name or modified state.
Creates a new setup.
HRESULT NewSetup([in] VARIANT options)If the setup has been modified then the behaviour of this function will depend upon the ‘options’ parameter and may fail as a result.
Gets a list of the devices that are attached to the system.
HRESULT CreateDeviceList([out, retval] IDashDeviceList **retval)This will implicitly re-scan the system for the attached devices.
Generate Help Information as JSON.
HRESULT GenerateHelpInfo([in, optional] VARIANT options, [out, retval] BSTR *result)The information as a JSON string. If outputFile is specified in options then the returned string will be blank.
If the ‘options’ parameter has a property ‘outputFile’ then the JSON will be written to that file instead of returned as a string.
Enumerate Windows in the application.
HRESULT EnumerateWindows([in, optional] VARIANT options, [out, retval] BSTR *result)The information as a JSON string.
Take a screenshot of a window or the whole application.
HRESULT TakeScreenShot([in, optional] VARIANT options, [out, retval] VARIANT *result)The information as a JSON string.
If the ‘options’ parameter has a property ‘outputFile’ then the screenshot will be output to that path instead of returned.
options can identify the window through one of the following keys:
If one of these items are not specified then a screenshot of the main window will be taken.
Other options:
Close a window (if possible).
HRESULT CloseWindow([in] VARIANT options, [out, retval] VARIANT *result)TRUE if OK, false otherwise. This is a variant for posssilbe future changes.
options: id: Window ID for the window to close. name: ’name’ of window to close. label: ’label’ of window to close. code: result code (e.g. if the window is modal - see e.g. wxID_OK).
Focus & raise a window (if possible).
HRESULT FocusWindow([in] VARIANT options)Set mutiple properties on a window / view.
HRESULT SetProperties([in] VARIANT options, [in] VARIANT props)Get all properties from a window / view.
HRESULT GetProperties([in] VARIANT options, [out, retval] VARIANT *result)a JSON string detailing the properties.
Set a single property on a window / view.
HRESULT SetProperty([in] VARIANT options, [in] BSTR name, [in] VARIANT value)Special Properties:
“selection”: string: json style array [[row,col],…n]. ‘col’ is optional. e.g. “[[5,2],[5,3]]” If a number is specified, the whole row is selected. “text”: For text editors, sets the text.
“expand_sidebar”: Expand the sidebar. “lock_sidebar”: Lock the sidebar.
Get a single property from a window / view.
HRESULT GetProperty([in] VARIANT options, [in] BSTR name, [out, retval] VARIANT *result)The property value.
Simulate a mouse click.
HRESULT Click([in] VARIANT options)Set a simulator channel value.
HRESULT SetSimulationChannel([in] BSTR channel, [in] VARIANT value)Import CAN DBC file.
HRESULT ImportCanDbc([in] BSTR path, [in] VARIANT options)Simulate a keyboard.
HRESULT Keyboard([in] VARIANT options)Obtains an interface for listing CAN adaptors connected to the PC.
HRESULT ListCANPorts([out, retval] IDashCANPorts **retval)Connect a physical CAN port to the simulator.
HRESULT BindSimuatorCANPort([in] int index, [in] BSTR port_identifier, [in] VARIANT options)Note: The CAN port will use the bitrate defined in the display setup.
Embed a CDX Model package into the currently open setup (if editable + supported).
HRESULT EmbedCdxModel([in] BSTR path)Replaces the current model identity, embedded firmware and Model IPC signal definitions. Takes into account the package’s ‘protected’ setting. The source path is retained for file-change notifications and reloading.
Does not program the display, show ant dialogs, change tabs, or save the setup. Call SaveSetup or SaveSetupAs afterwards to persist the embedded model.
Returns E_INVALIDARG for an empty filename, or a failing HRESULT if no editable CD6 setup is open or package validation/installation fails. For more errors information, see LastErrorString.
// Save as automate.js and run with the Windows Script Host batch file
// shown in the application interface examples.
var app = new ActiveXObject("GemsDashDesign.Application");
var options = app.CreateOptionsMap();
options.discardModifiedFiles = true;
options.promptSaveModified = false;
options.allowFileOverwrite = true;
app.OpenSetup("C:\\Setups\\input.cd6.gdd", options);
app.EmbedCdxModel("C:\\Models\\engine.cdxmodel");
app.SaveSetupAs("C:\\Setups\\output.cd6.gdd", options);using System;
using System.Runtime.InteropServices;
var applicationType = Type.GetTypeFromProgID("GemsDashDesign.Application", throwOnError: true)!;
dynamic app = Activator.CreateInstance(applicationType)!;
try
{
dynamic options = app.CreateOptionsMap();
try
{
options.discardModifiedFiles = true;
options.promptSaveModified = false;
options.allowFileOverwrite = true;
app.OpenSetup(@"C:\Setups\input.cd6.gdd", options);
app.EmbedCdxModel(@"C:\Models\engine.cdxmodel");
app.SaveSetupAs(@"C:\Setups\output.cd6.gdd", options);
}
finally
{
Marshal.FinalReleaseComObject(options);
}
}
finally
{
Marshal.FinalReleaseComObject(app);
}$ErrorActionPreference = 'Stop'
$app = New-Object -ComObject 'GemsDashDesign.Application'
try {
$options = $app.CreateOptionsMap()
try {
$options.discardModifiedFiles = $true
$options.promptSaveModified = $false
$options.allowFileOverwrite = $true
$app.OpenSetup('C:\Setups\input.cd6.gdd', $options)
$app.EmbedCdxModel('C:\Models\engine.cdxmodel')
$app.SaveSetupAs('C:\Setups\output.cd6.gdd', $options)
} finally {
[void][System.Runtime.InteropServices.Marshal]::FinalReleaseComObject($options)
}
} finally {
[void][System.Runtime.InteropServices.Marshal]::FinalReleaseComObject($app)
}Configure the next simulator launch without starting it.
HRESULT ConfigureSimulator([in] VARIANT options)debugger attach.
Stop the simulator before configuring.
Empty model paths are auto-populated from environment variables CDX_MODEL_DLL
Returns E_INVALIDARG for bad options; E_FAIL for unsupported displays, invalid files, or if the simulator is already running. For more errors information, see LastErrorString.
Start with SimulatorRunning = true, then use SimulatorProcessId to attach Visual Studio or VS Code’s native debugger to SimHost, which loads both DLLs.
Query implemented CDX Model image descriptor versions without loading a package.
HRESULT SupportsCdxModelImageDescriptor([in] LONG descriptorVersion, [out, retval] VARIANT_BOOL *supported)Read-only: requires no open setup, files or connected device, and does not import, save, program or change UI state. S_OK for known and unknown versions; E_POINTER if supported is null. A true result does not bypass validation: schema 2 requires descriptor 1/3, schema 3 requires descriptor 2/4 and valid calibration metadata; all package integrity and identity checks still apply.
Older servers may not implement this appended method. Late-bound clients must handle a missing member as unknown capability, not infer support from the application version. Native clients require an updated server.
Interface for access to PC logging features.
{}
| Property | Description |
|---|---|
| Count | Get the number of items in the list. |
| IncludePCAN_ISA | Property to include ISA PCAN ports in the list (default false). |
| IncludeKvaserVirtual | Property to include Kvaser Virtual CAN ports in the list (default false). |
| Function | Description |
|---|---|
| Refresh | Refresh the ports list. Blocks execution until complete. |
| NameAt | Get friendly name of the port at the specified index in the port list. |
| IdentifierAt | Get an identifier for the port at the specified index in the port list. |
Get the number of items in the list.
int CountProperty to include ISA PCAN ports in the list (default false).
BOOL IncludePCAN_ISAProperty to include Kvaser Virtual CAN ports in the list (default false).
BOOL IncludeKvaserVirtualRefresh the ports list. Blocks execution until complete.
HRESULT Refresh()Get friendly name of the port at the specified index in the port list.
HRESULT NameAt([in] unsigned int index, [out, retval] BSTR *retval)Get an identifier for the port at the specified index in the port list.
HRESULT IdentifierAt([in] unsigned int index, [out, retval] BSTR *retval)The identifier is a string that uniquely identifies the CAN port and may be used to open the port by other functions.
Interface for controlling a device.
Note that this object initially represents a device factory. i.e. it is an object which has the ability to create instances of a real device object internally to GDA for the purpose of executing various commands.
| Property | Description |
|---|---|
| Name | Gets the name of this device. |
| SerialNumber | Gets the device serial number. |
| Description | Gets the device description. |
| UsbVid | Gets the device USB PID. |
| UsbPid | Gets the device USB PID. |
| Function | Description |
|---|---|
| DownloadSetup | Start a setup download for this device. |
| UploadSetup | Start a setup upload for this device (programs opened setup into the device). |
| UploadFirmware | Start a firmware upload for this device. |
| EraseLog | Start an Erase Log operation for this device. |
| UploadSetupUnattended | Upload a setup without interactive prompts. |
Gets the name of this device.
BSTR NameGets the device serial number.
BSTR SerialNumberGets the device description.
BSTR DescriptionGets the device USB PID.
int UsbVidGets the device USB PID.
int UsbPidStart a setup download for this device.
HRESULT DownloadSetup([in] BSTR filename, [in, optional] VARIANT options, [out, retval] IDashJob **retval)Start a setup upload for this device (programs opened setup into the device).
HRESULT UploadSetup([in] BSTR filename, [in, optional] VARIANT options, [out, retval] IDashJob **retval)Start a firmware upload for this device.
HRESULT UploadFirmware([in] BSTR filename, [in, optional] VARIANT options, [out, retval] IDashJob **retval)Start an Erase Log operation for this device.
HRESULT EraseLog([in, optional] VARIANT options, [out, retval] IDashJob **retval)Upload a setup without interactive prompts.
HRESULT UploadSetupUnattended([in] BSTR filename, [in, optional] VARIANT options, [out, retval] IDashJob **retval)enableSetupDownload (default false).
checkFirmwareUpdate defaults to false. Setting it, acceptFirmwareUpdate, acceptEraseLog or rawSetup to true fails the job before device access. allowDisplayMismatch defaults to false; when true, a mismatch that the interactive uploader permits confirming is accepted with a warning.
S_OK when the job is created, E_INVALIDARG for an empty filename, E_POINTER for a null output, or a COM error if the setup cannot be opened. An unapproved display-type mismatch, nonempty log or excessive RAM requirement fails without a confirmation dialog.
A rejected job does not erase logs or program the device.
Keep the application and job references until completion or confirmed cancellation. Legacy versions do not expose this method; clients must check its DISPID before use.
Interface for accessing a list of attached devices.
| Property | Description |
|---|---|
| Count | Gets the number of devices in the list. |
| Function | Description |
|---|---|
| NameAt | Gets the name of the device at the given index. |
| SerialNumberAt | Gets the serial number of the device at the given index. |
| DescriptionAt | Gets the description of the device at the given index. |
| UsbVidAt | Gets the USB VID (Vendor ID) of the device at the given index. |
| UsbPidAt | Gets the USB PID (Product ID) of the device at the given index. |
| Get | Gets a representation of the device at the given index. |
| Refresh | Rescan the system for the attached devices and update the list. |
| IsUsbAt | Tests whether the device uses a physical USB connection. |
Gets the number of devices in the list.
int CountGets the name of the device at the given index.
HRESULT NameAt([in] int index, [out, retval] BSTR *retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Gets the serial number of the device at the given index.
HRESULT SerialNumberAt([in] int index, [out, retval] BSTR *retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Gets the description of the device at the given index.
HRESULT DescriptionAt([in] int index, [out, retval] BSTR *retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Gets the USB VID (Vendor ID) of the device at the given index.
HRESULT UsbVidAt([in] int index, [out, retval] int *retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Gets the USB PID (Product ID) of the device at the given index.
HRESULT UsbPidAt([in] int index, [out, retval] int *retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Gets a representation of the device at the given index.
HRESULT Get([in] int index, [out, retval] IDashDevice **retval)If the index is invalid, an error will be rasied (E_INVALIDARG).
Note that this function will always create a new object.
You cannot compare object pointers for equality to identify devices. Use IDashDevice::DevID
Rescan the system for the attached devices and update the list.
HRESULT Refresh(void)Tests whether the device uses a physical USB connection.
HRESULT IsUsbAt([in] int index, [out, retval] VARIANT_BOOL *retval)S_OK on success, E_INVALIDARG for an invalid index. Refresh the list before querying; this does not open the device.
Interface for controlling and monitoring the progress of asynchronous Jobs/Tasks.
The PowerShell example accepts a job returned by an operation such as IDashDevice::UploadSetup. Pass that object as $job after starting the operation on the intended device. It polls Completed so that the progress display can be updated instead of blocking in Wait. Completed does not imply success: check Failed and Error afterwards. The progress display is cleared even if an error occurs. Stopping the script does not cancel the device operation.
function Wait-DashJob {
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[object]$Job,
[string]$Activity = 'Display operation'
)
$ErrorActionPreference = 'Stop'
try {
while (-not $Job.Completed) {
$percent = [int][Math]::Floor($Job.Progress * 100)
Write-Progress -Id 1 -Activity $Activity `
-Status "$percent% complete" -PercentComplete $percent
Start-Sleep -Milliseconds 200
}
if ($Job.Failed) {
throw "The job failed: $($Job.Error). Resolve the problem reported in the messages below and retry.`n$($Job.AllMessages)"
}
$Job.AllMessages
} finally {
Write-Progress -Id 1 -Activity $Activity -Completed
}
}
Wait-DashJob -Job $job -Activity 'Uploading display setup'var app = new ActiveXObject("GemsDashDesign.Application");
var device = false;
if (app) {
device = app.SelectedDevice;
}
if (device !== false) {
var job = device.UploadSetup(
"C:\\Folder\\setup.file"
);
while (!job.Completed) {
var prog = (job.Progress * 100) + "%";
WScript.StdOut.WriteLine(prog);
WScript.Sleep(500);
}
WScript.StdOut.WriteLine("Completed.");
if (job.Error && job.Error.length) {
WScript.StdOut.WriteLine("Error: " + job.Error);
}
}| Property | Description |
|---|---|
| Progress | Gets the progress of the Job as a value between 0.0 and 1.0 inclusive. |
| Completed | Indicates if the Job has completed. |
| Failed | Indicates if the Job failed. |
| Error | Gets the error status of the Job. |
| AllMessages | Gets a newline-separated string containing all messages generated by the Job. |
| Function | Description |
|---|---|
| Cancel | Cancels the Job. |
| Wait | Wait for the Job to complete. |
Gets the progress of the Job as a value between 0.0 and 1.0 inclusive.
double ProgressIndicates if the Job has completed.
BOOL CompletedCheck the Error property to determine if there was a failure.
Indicates if the Job failed.
BOOL FailedSee Also: Error
Gets the error status of the Job.
BSTR ErrorThis string will be empty of the Job completed without errors.
See Also: Failed
Gets a newline-separated string containing all messages generated by the Job.
BSTR AllMessagesCancels the Job.
HRESULT Cancel(void)Wait for the Job to complete.
HRESULT Wait(void)This will block until the job is completed. Note that this will run the main application event loop from within the wait subroutine - so if the user interface is displayed then the user may still be able to interact with the application.
Interface for configuring file control options for use with various file-based functions in the COM API.
| Function | Description |
|---|---|
| GetProperty | |
| SetProperty | properties are made available by the IDispatch interface (late-binding). |
HRESULT GetProperty([in] BSTR name, [out, retval] VARIANT *retval)properties are made available by the IDispatch interface (late-binding).
HRESULT SetProperty([in] BSTR name, [in] VARIANT value)The following namespaces are available:
GemsDashDesign COM automation library.
No documented data types were found.