Example for Loading Metadata

The following subroutine loads metadata from an XML file. The example loads metadata for all dimensions, replacing any existing metadata.

Sub LoadMetaACV(sFile As String, sLog As String)
Dim cMetadataLoadACV As HsvMetadataLoadACV
Dim cOptions As IHsvLoadExtractOptions
Dim cOpt As IHsvLoadExtractOption
Set cMetadataLoadACV = New HsvMetadataLoadACV
'g_cSession is an HsvSession object reference
cMetadataLoadACV.SetSession g_cSession
'Initialize the IHsvLoadExtractOptions interface.
Set cOptions = cMetadataLoadACV.LoadOptions
'Turn on Replace mode
Set cOpt = cOptions.Item(HSV_METALOAD_OPT_USE_REPLACE_MODE)
cOpt.CurrentValue = False
'Load from an XML file
Set cOpt = cOptions.Item(HSV_METALOAD_OPT_FILE_FORMAT)
cOpt.CurrentValue = HSV_METALOADEX_FORMAT_XML
'Load the Metadata
cMetadataLoadACV.Load sFile, sLog
End Sub