MonitorService.RunMonitor_New
This function creates and runs a Monitor.
Syntax | Parameters | Return Value |
---|---|---|
Function MonitorService.RunMonitor_New( _ Monitor As Variant, _ RunOption As MonitorRunOption) As MonitorRunStatus |
The ID of the analysis configuration. Type: Variant Options for how to run the analysis configuration. Type: MonitorRunOption |
MonitorRunStatus |
Remarks
The following options are can be passed to this function. Note that the first argument should be passed in as a string. For example:
monRunOpt.Add("RunQuiet", True)
Function | Description |
---|---|
AllowSaveIQCSpec | Allows the IQC specs to be saved into the Enterprise database. The value for the second parameter is a boolean value. If True is used, the specs will be saved in the Enterprise database. If False, they will not be saved. |
CriteriaSourceFile | Allows the monitor to use criteria stored in an .ini file. The value for the second parameter is the file path to the .ini file. |
DataOnly | Extracts only the data from the monitor. No IQC projects or SVB programs are executed. The value for the second parameter is a boolean value. If True is used, only the data will be extracted when the monitor is executed. |
Debug | Allows information to be written to the log file. The second parameter for this option is a boolean value. |
DisableAutoTransfer | Disables the automatic updating ability of a monitor. The value for this option is a boolean value. If true, the DisableAutoTranser option is applied. |
DisablePeriodicAutoTransfer | Disables the periodic automatic updating. The Update button must be pressed before the updating would occur. The value for this property is a boolean value. If true, the DisablePeriodicAutoTransfer option is applied. |
Force_Display_SQLCriteria_Dialog_If_Required_Fields_Need_Values | if a required field needs a value (filtering), then the SQL Criteria dialog will be displayed. The second parameter for this option is a boolean value. |
ForceRunNewDataMacro | Forces the SVB code associated with automatic update to be executed, even if automatic updating is disabled. The second parameter for this option is a boolean value. |
MaxCrosstabColumn | Sets the maximum crosstab columns that can be created. The value for the second parameter is the maximum crosstab columns. |
MaxIQCProject | Sets the maximum number IQC projects for the monitor. The value for the second parameter is the maximum IQC projects. |
MaxSample | Sets the maximum samples for an IQC monitor. The value for the second parameter is the maximum samples to be used. |
RunQuiet | Executes the monitor without requiring user intervention. The value for this property is a boolean value. If true, the RunQuiet option is applied. |
RunSVBVisibly | Allows the user to specify whether or not SVB programs are visible when executed. The second parameter is a boolean value. If True is specified, then the SVB will be executed in visible mode. If False, the SVB will not be visible. |
SetName | Allows a set name to be specified. The second parameter is a string value representing the set name to be used. |
TargetSpreadsheetFileName | Override the spreadsheet file name by specifying a new file name or disable the saving of the spreadsheet by specifying "NoFile". The value for the second parameter is a string: either the file name to be used or "NoFile" to disable the saving of the spreadsheet. |
SVB Example
Running an SVB analysis configuration:
Sub Main Dim oOM As New ObjectManager oOM.Reconnect(Application) 'Find the SVB analysis configuration Dim mon As Monitor Set mon = oOM.Monitors.Item("/Blake's Materials/Weights Descriptives") 'Create a service to run analysis configurations Dim monSrvCreator As New MonitorServiceCreator Dim monSrv As MonitorService Set monSrv = monSrvCreator.CurrentServiceEx(Application) 'Set the parameters for how to run the analysis configuration Dim monRunOpt As New MonitorRunOption monRunOpt.Add "RunQuiet", True monRunOpt.Add "DisplayInPanel", False monRunOpt.Add "DisableAutoTransfer", True monRunOpt.Add "TargetSpreadsheetFileName", "NoFile" monRunOpt.Add "CheckMonitorRunEntryExist", False monRunOpt.Add "Force_Display_SQLCriteria_Dialog_If_Required_Fields_Need_Values", True 'Run it Dim monRunStatus As MonitorRunStatus Set monRunStatus = monSrv.RunMonitor_New(mon.ID, monRunOpt) monRunStatus.WaitForComplete oOM.Disconnect End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.