CopyInputDataForMultipleEntities

Copies data for one or more entities from one set of cells to another set of cells.

CopyInputDataForMultipleEntities enables you to multiply the source cells’ amounts by a factor before inserting the amounts in the target cells, and to copy the source cells’ cell text descriptions to the target cells.

Syntax

<HsvData>.CopyInputDataForMultipleEntities lView, lSourceScenario, lDestScenario, lSourceYear, lDestYear, varlaSourcePeriodSubset, varlaDestPeriodSubset, varlaEntities, varlaParents, vbCopyEntitiyCurrencyValueID, vbCopyNoneValueID, varlaAccountSubset, dFactor, vbCopyCellText, vbCopyDerived, vbIgnoreWarnings, lEnumUpdateMode, bstrLogFileName, vbEnableDetailedLogging

Argument

Description

lView

Long (ByVal). The member ID of the source and target cells’ View dimension member.

lSourceScenario

Long (ByVal). The member ID of the Scenario dimension member for the source cells.

lDestScenario

Long (ByVal). The member ID of the Scenario dimension member for the target cells.

lSourceYear

Long (ByVal). The member ID of the Year dimension member for the source cells.

lDestYear

Long (ByVal). The member ID of the Year dimension member for the target cells.

varlaSourcePeriodSubset

Long array (ByVal). The member IDs of the Period dimension members for the source cells.

varlaDestPeriodSubset

Long array (ByVal). The member IDs of the Period dimension members for the target cells.

varlaEntities

Long array (ByVal). The member IDs of the source and target cells’ Entity dimension members.

varlaParents

Long array (ByVal). The member IDs of the parents of the varlaEntities argument’s entities.

vbCopyEntitiyCurrencyValueID

Boolean (ByVal). Specifies whether cells for the <Entity Currency> Value dimension member are to be included in the source and target cells. Pass TRUE to include these cells, otherwise FALSE.

Tip:

For an explanation of the different types of Value dimension members, see Currency-Related Value Dimension Members.

vbCopyNoneValueID

Boolean (ByVal). Specifies whether cells for the [None] Value dimension member are to be included in the source and target cells. Pass TRUE to include these cells, otherwise FALSE.

varlaAccountSubset

Long array (ByVal). The member IDs of the source and target cells’ Account dimension members.

dFactor

Double (ByVal). The factor by which the copied data is to be multiplied before it is placed in the target cells. To copy the data without changing it, pass 1.

vbCopyCellText

Boolean (ByVal). Specifies whether the source cells’ cell text descriptions are to be copied to the target cells. Pass TRUE to include the cell text descriptions, otherwise FALSE.

vbCopyDerived

Boolean (ByVal). Specifies whether derived source data is to be copied to the destination cells as stored input. Pass TRUE to copy derived source data, otherwise FALSE.

vbIgnoreWarnings

Boolean (ByVal). Specifies whether data will be copied if the system generates a warning-level error. Pass TRUE to copy data if warnings occur, otherwise FALSE.

Note:

Warnings will be included in the log file regardless of whether you specify TRUE or FALSE.

lEnumUpdateMode

Long (ByVal). Determines the update mode. For more information and valid values, see Update Mode Constants.

bstrLogFileName

String (ByVal). The name and path of the log file in which the system will include information regarding the copy data operation.

vbEnableDetailedLogging

Boolean (ByVal). Specifies whether the log file includes details such as the names of the source and destination dimension members. Pass TRUE to include such details, FALSE otherwise.

Example

The following example creates a subroutine that copies data from one year’s cells to another. The subroutine takes IDs of the cells’ dimension members. Note that the scenarios and years passed to this subroutine are used by CopyInputDataForMultipleEntities as both sources and targets, and that the lEnumUpdateMode argument sets CopyInputDataForMultipleEntities to replace mode.

Sub CopyCellsYearReplace(lView, lScen, lSrcYear, _
lDestYear, laPer, laEnts, laPars, laAccts)
Dim cHsvData As HsvData
Set cHsvData = m_cHsvSession.Data
cHsvData.CopyInputDataForMultipleEntities lView, lScen, lScen, _
   lSrcYear, lDestYear, laPer, laPer, laEnts, laPars, True, _
   True, laAccts, 1, True, True, True, _
   HSV_DATA_UPDATE_REPLACE, "c:\temp\CopyLog.txt", False
End Sub