Extracting Journals without Filters

To extract journals without applying filters, set extract options with the ExtractOptions property, then call Extract as shown in the following steps. These steps assume that an application has previously been opened with one of the OpenApplication methods.

Note:

For an example that illustrates these steps, see Example for Extracting Journals Without Filters.

  To extract journals without filtering:

  1. Set an object reference to the HsvJournalLoadACV object.

  2. Point to the application from which journals are being extracted by calling HsvJournalLoadACV.SetSession. For SetSession’s argument, pass the HsvSession object reference that was returned by HsxClient.OpenApplication or HsxClientUI.OpenApplication.

  3. Set an object reference to the IHsvLoadExtractOptions interface with the HsvJournalLoadACV.ExtractOptions property.

  4. Specify the Scenario and Year dimension members for which journals are to be extracted. To specify these members, use the Scenario and Year extract options.

    Note:

    For details on journal extract options, see Table 82, Journal Extract Options (Unfiltered).

  5. Optional. To override the defaults for other extract options, specify the values for these options. If you do not override any defaults, journals will be extracted, and standard and recurring templates will not be extracted.

  6. Extract the journals by calling HsvJournalLoadACV.Extract. Extract takes the file names and paths of the journal extract file and of the log file.

Example for Extracting Journals Without Filters

The following example extracts journals for the Actual scenario in the year 2000.

Note:

The example uses a user-defined function named GetMemberID to obtain the IDs of these members. For information on this user-defined function, see the Examples for GetItemID.

Dim cJournalLoadACV As HsvJournalLoadACV
Dim cOptions As IHsvLoadExtractOptions
Dim cOpt As IHsvLoadExtractOption
Dim lScen As Long, lYear As Long
Set cJournalLoadACV = New HsvJournalLoadACV
'Specify the HsvSession object for the application.
cJournalLoadACV.SetSession g_cHsvSession
'Initialize the IHsvLoadExtractOptions interface.
Set cOptions = cJournalLoadACV.ExtractOptions
'Set the scenario to "Actual"
Set cOpt = cOptions.Item(HSV_JOURNALEXTRACT_OPT_SCENARIO)
lScen = GetMemberID(DIMENSIONSCENARIO, "Actual")
cOpt.CurrentValue = lScen
'Set the year to "2000"
Set cOpt = cOptions.Item(HSV_JOURNALEXTRACT_OPT_YEAR)
lYear = GetMemberID(DIMENSIONYEAR, "2000")
cOpt.CurrentValue = lYear
'Extract the Journals
cJournalLoadACV.Extract "c:\Acme\Jnl.jlf", "c:\Acme\Jnl.log"