BinaryDocuments.AddEx
This function adds a new Binary Document into the collection and returns a new object (with audit log explanation).
Syntax | Parameters | Return Value |
---|---|---|
Function BinaryDocuments.AddEx( _ CreateInfo As BinaryDocumentCreateInfo) As BinaryDocument |
CreateInfo [in]
Information about the document being added. Type: BinaryDocumentCreateInfo |
BinaryDocument |
SVB Example
Adding a document to Enterprise:
Sub Main Dim oOM As ObjectManager 'Reconnect into Enterprise ObjectManager Set oOM = New ObjectManager oOM.Reconnect Application Dim MySVBFileInfo As New BinaryDocumentCreateInfo MySVBFileInfo.Folder = oOM.FindFolder("/Blake's Materials") MySVBFileInfo.Name = "WEIGHTS Descriptives Script" MySVBFileInfo.AuditLogReason = "Adding Descriptive Stats macro for WEIGHTS columns" MySVBFileInfo.Type = "svb" 'Data will be the document's filepath. 'In this example, it will be a descriptive stats SVB file designed 'to analyze variables 3, 6, and 9 (the Weights bundle) of our Cat Clinic data. MySVBFileInfo.Data = "C:\temp\Descriptives.svb" Dim MySVBScript As BinaryDocument Set MySVBScript = oOM.BinaryDocuments.AddEx(MySVBFileInfo) MySVBScript.AutoSave = False MySVBScript.AccessControlList.AddGroup("Administrators", True) MySVBScript.AccessControlList.AddGroup("Everyone", False) MySVBScript.AccessControlList.AddUser("Blake", True) Dim docUpdateInfo As new BinaryDocumentUpdateInfo docUpdateInfo.AuditLogReason = "Setting permissions" MySVBScript.SaveEx(docUpdateInfo) oOM.Disconnect End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.