Monitors.AddEx
This function adds a new Monitor into the collection and returns a new object; type of object (Monitor, OutputMonitor) depends on MonitorType (with audit log explanation).
| Syntax | Parameters | Return Value |
|---|---|---|
Function Monitors.AddEx( _
CreateInfo As MonitorCreateInfo) As Object
|
CreateInfo [in]
Information about the analysis configuration being added. Type: MonitorCreateInfo |
Object |
SVB Example
Adding an SVB analysis configuration:
Sub Main
Dim oOM As ObjectManager
'Reconnect into Enterprise ObjectManager
Set oOM = New ObjectManager
oOM.Reconnect Application
Dim SVBAnalysisConfigCreateInfo As New MonitorCreateInfo
SVBAnalysisConfigCreateInfo.AuditLogReason = "Adding an SVB Analysis"
SVBAnalysisConfigCreateInfo.Name = "Weights Descriptives"
SVBAnalysisConfigCreateInfo.Folder = oOM.FindFolder("/Blake's Materials")
SVBAnalysisConfigCreateInfo.Profile = oOM.Profiles.Item("/Blake's Materials/Cats")
SVBAnalysisConfigCreateInfo.MonitorType = swcSVBMonitor
Dim SVBAnalysisConfig As Monitor
Set SVBAnalysisConfig = oOM.Monitors.AddEx(SVBAnalysisConfigCreateInfo)
SVBAnalysisConfig.AutoSave = False
'Connect the configuration to the SVB macro "WEIGHTS Descriptives Script"
'that is embedded in the system
SVBAnalysisConfig.Type = swcSVBMonitor
SVBAnalysisConfig.SVBCodeInfo.LinkedObject = oOM.BinaryDocuments.Item("/Blake's Materials/WEIGHTS Descriptives Script")
SVBAnalysisConfig.SVBCodeInfo.Type = swcCodeType_Linked
'Set permissions
SVBAnalysisConfig.AccessControlList.AddGroup("Administrators", True)
SVBAnalysisConfig.AccessControlList.AddGroup("Everyone", False)
SVBAnalysisConfig.AccessControlList.AddUser("Blake", True)
Dim configUpdateInfo As New MonitorUpdateInfo
configUpdateInfo.AuditLogReason = "Setting permissions"
SVBAnalysisConfig.SaveEx(configUpdateInfo)
oOM.Disconnect
End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.
