StandardProfile.SaveEx

This function saves changes to this Standard Profile (with audit log explanation).

Syntax Parameters Return Value
Sub StandardProfile.SaveEx( _
    UpdateInfo As ProfileUpdateInfo)
UpdateInfo [in]

Explanation about the update being made to the data entry setup.

Type: ProfileUpdateInfo

This function does not return a value.

SVB Example

Data Entry Example 3: Adding a data entry setup:

Sub Main

    Dim oOM As ObjectManager
    'Reconnect into Enterprise
    Set oOM = New ObjectManager
    oOM.Reconnect Application

    'Create the data entry setip
    Dim breadDataEntryInfo As New ProfileCreateInfo
    breadDataEntryInfo.AuditLogReason = "Adding data entry setup for bread"
    breadDataEntryInfo.Folder = "/Blake's Materials"
    breadDataEntryInfo.Name = "Bread Measurements"
    breadDataEntryInfo.StandardProfile = True

    'Add the setup to the system
    Dim breadDataEntrySetup As StandardProfile
    Set breadDataEntrySetup = oOM.Profiles.AddEx(breadDataEntryInfo)
    breadDataEntrySetup.AutoSave = False

    'Connect our labels and characteristics to the data entry
    breadDataEntrySetup.InputDescription.AddLabel("Bakeries", False).Required = True
    breadDataEntrySetup.InputDescription.AddLabel("Bakers", False).Required = True
    breadDataEntrySetup.InputDescription.AddCharacteristic("Grain Level").Required = True

    'Samples will need to be approved, and will be complete once data entry is finished
    breadDataEntrySetup.AllowSampleApproval = True
    breadDataEntrySetup.CompleteOnSave = True

    'Set permissions
    breadDataEntrySetup.AccessControlList.AddGroup("Administrators", True)
    breadDataEntrySetup.AccessControlList.AddGroup("Everyone", False)
    breadDataEntrySetup.AccessControlList.AddUser("Blake", True)

    'Commit our changes
    Dim breadDataEntryUpdateInfo As New ProfileUpdateInfo
    breadDataEntryUpdateInfo.AuditLogReason = "Setting up bread data entry setup"
    breadDataEntrySetup.SaveEx(breadDataEntryUpdateInfo)

    'Update the system to include all labels for us automatically when
    'we explore this data entry setup
    oOM.SystemOptions.DataEntryOptions.AutoAddAllLabelCriteria = True
    Dim changeReason As New SystemOptionUpdateInfo
    changeReason.AuditLogReason = "Setting analysis configurations to select all labels automatically"
    oOM.SystemOptions.DataEntryOptions.SaveEx(changeReason)

    oOM.Disconnect

End Sub