Open this page in the API Guide

IMetricSetService.AddReplaceHierarchy Method

Adds or replaces a HierarchyUsage element to the metric set and saves it. It promotes the implicit hierarchy to the specified external hierarchy and sets the rendered top level.

Namespace:  Dundas.BI.Entities.MetricSets
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (25.1.0.1000)
Syntax
HierarchyUsage AddReplaceHierarchy(
	MetricSet metricSet,
	Guid elementParentId,
	string elementName,
	PlacementPosition placement,
	Guid hierarchyParentId,
	string hierarchyUniqueName,
	string levelUniqueName
)

Parameters

metricSet
Type: Dundas.BI.Entities.MetricSets.MetricSet
The metric set.
elementParentId
Type: System.Guid
The parent entity ID for the element to be added.
elementName
Type: System.String
The name of the element (column/measure/hierarchy) to add.
placement
Type: Dundas.BI.Entities.MetricSets.PlacementPosition
The element placement position.
hierarchyParentId
Type: System.Guid
The external hierarchy parent ID.
hierarchyUniqueName
Type: System.String
The unique name of the external hierarchy.
levelUniqueName
Type: System.String
The unique name of the hierarchy level.

Return Value

Type: HierarchyUsage
The hierarchy usage element.
Exceptions
ExceptionCondition
ArgumentExceptionelementParentId or hierarchyParentId is Empty or elementName is not a valid non-empty string or placement is not a PlacementPosition valid value or elementParentId references an object that could not be found or an object that is invalid for the current operation.
InvalidOperationExceptionThe metric set is not checked out to the caller or the underlying IAnalysisStructure does not support the current operation, either because it is not auto-generated or joining to the structure specified by elementParentId is not supported.
ArgumentNullExceptionmetricSet is null.
NotFoundExceptionThe structure with the specified elementParentId or hierarchyParentId does not exist.
InvalidSessionExceptionThe caller context is not associated with a valid session.
See Also