SDMSHelper.ApproveWithBumpingVersion

Syntax Parameters Return Value
Function SDMSHelper.ApproveWithBumpingVersion( _
    Hwnd As Integer, _
    ObjectType As FolderObjectType, _
    ObjectID As Integer, _
    ApprovalType As String, _
    Comment As String) As Integer
  • Hwnd [in]

The handle of the Statistica application.

Type: Integer

  • ObjectType [in]

The type of document that is being approved.

Type: FolderObjectType

  • ObjectID [in]

The ID of the document.

Type: Integer

  • ApprovalType [in]

The type of approval. Call ApprovalTypes() to get a list of possible values.

Type: String

  • Comment [in]

A comment to add to the approval.

Type: String

Integer

SVB Example

Approving a document via SDMS:

Sub Main

    'Run the example "Adding a document to Enterprise" prior to running
    'this one. It will assume a file named "/Blake's Materials/WEIGHTS Descriptives Script.svb"
    'is in the system.
    Dim oOM As ObjectManager
    'Reconnect into Enterprise
    Set oOM = New ObjectManager
    oOM.Reconnect Application

    'Approve the document by ID.
    'Note: SDMSHelper.ApprovalTypes returns the strings representing the different types of approvals:
    '0. Read and Understood
    '1. Approved for internal distribution
    '2. Approved for publication
    oOM.SDMSHelper.ApproveWithBumpingVersion(Application.Handle, swcBinaryDocument, _
        oOM.BinaryDocuments("/Blake's Materials/WEIGHTS Descriptives Script.svb").ID, _
        oOM.SDMSHelper.ApprovalTypes(Application.Handle)(1), "Approved by " & oOM.SDMSHelper.CurrentUserName(Application.Handle))

    oOM.Disconnect

End Sub