Spotfire can be controlled from another client. The inter-process communication is established via COM, making the desired functionality of the automation interface in Spotfire available to the remote client.
Overview
When Spotfire is installed, it is registered as an ActiveX object
with the ProgId Spotfire.Dxp. A client can use
this ProgID to launch Spotfire via COM, and receives a reference
to a Spotfire controller object. The controller handles the
starting and stopping of intercommunication in Spotfire.
The client creates a callback object internally and calls Spotfire
to set up the intercommunication. When Spotfire has finished
its startup sequence, the client is notified and allowed to
load its automation view. From now on the view is used for the
communication.
Note: All method calls made between the client
and Spotfire use late binding and are therefore basically untyped.
Tutorial
-
How to Create an Automation Interface
An Automation Interface is a class designed to be loaded in Spotfire to enable remote control. The public methods of this class will be COM visible and can thus be called by an automation client.
Start-up sequence
The following sequence diagram details the interconnection procedure
up to the point where the client can control Spotfire via the
automation interface:
- The client instantiates Spotfire via COM by creating it as an
ActiveXObject.
- COM launches Spotfire in automation mode by the
Spotfire.Dxp.exe
/Automation command.
- Spotfire creates a Spotfire controller object that implements
the
IAnalysisApplicationController
interface and makes it COM visible by a
CoRegisterClassObject() function call.
- COM returns a Controller object reference to the client.
- Spotfire waits for the client to call
Start().
- The client creates an object implementing the
IAnalysisApplicationControllerCallback
interface.
- The client calls
Start()
on Spotfire.
- Spotfire starts.
- Spotfire calls
LoadViews()
on the callback object to indicate that the automation interface
can be loaded into Spotfire.
- The client calls
CreateObjectFrom()
to load the automation interface into Spotfire.
- Spotfire loads the assembly, instantiates the requested type,
and returns a COM handle to the instance of the requested type.
- Spotfire calls
Started()
on the callback object, signifying that inter-process communication
is established.