Auto-Updating (Running) Workspace Projects (e.g., When the Data Change)

Statistica Data Miner projects are themselves programmable objects, that can be called from within Statistica Visual Basic or other applications, that support the COM-Object architecture. This feature is particularly useful for connecting workspaces to application or spreadsheet events (see also Controlling Statistica Events with SVB Programs), so that the project automatically updates (runs) whenever the particular event occurs.

For example, suppose you wanted to connect a Statistica workspace project to a data file so that the project will automatically update every time the data in the data file change, follow these basic steps:

  1. Create and program the appropriate application or spreadsheet document event (see also Controlling Statistica Events with SVB Programs).

  2. Inside the event handler (Statistica Visual Basic program), update the desired Statistica workspace project.

Here is a simple example of a  spreadsheet event handler, for the spreadsheet DataChanged event:

Private Sub Document_DataChanged(ByVal Flags As Long, _
FirstCase As Long, ByVal FirstVar As Long, _
LastCase As Long, ByVal LastVar As Long, _
bLast As Boolean)

' Dimension DMProject as an object of type DataMiner
DMProject As DataMiner

'  Assign the currently ActiveDataMiner project to the DataMiner
'  object; here you could insert additional code (logic) for

'  "finding" the right DataMiner project.
DMProject = ActiveDataMiner

'  Execute (Run) the DataMiner project; you could insert here
'  additional code (logic) so that the project only updates when
'  certain cases or variables change. Many additional properties
'  and methods are available for the DataMiner object to fully
'  customize the auto-update "behavior".


End Sub

By connecting any of the Statistica application or document events to data miner projects, very complex and highly customized auto-updating schemes can be achieved.

See also, Data Mining Definition, Data Mining with Statistica Data Miner, Statistica Data Miner Summary, and Getting Started with Statistica Data Miner.