IMetricSetServiceAddElement Method

Adds an AnalysisElementUsage element to the given metric set and saves it.

Namespace:  Dundas.BI.Entities.MetricSets
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax
AnalysisElementUsage AddElement(
	MetricSet metricSet,
	Guid parentId,
	string elementName,
	PlacementPosition placement,
	string levelUniqueName
)

Parameters

metricSet
Type: Dundas.BI.Entities.MetricSetsMetricSet
The MetricSet to add the element to.
parentId
Type: SystemGuid
The ID of the element parent structure.
elementName
Type: SystemString
The name of the element (column/measure/hierarchy) to add.
placement
Type: Dundas.BI.Entities.MetricSetsPlacementPosition
The element placement position.
levelUniqueName
Type: SystemString
The optional unique name for hierarchy level, when the specified element is a hierarchy.

Return Value

Type: AnalysisElementUsage
The added usage element.
Exceptions
ExceptionCondition
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 parentId is not supported.
ArgumentNullExceptionmetricSet is .
ArgumentExceptionparentId is Empty or elementName is not a valid string or parentId references a structure that could not be found or that is invalid for the current operation or placement is not a PlacementPosition valid value.
NotFoundExceptionThe structure with the specified parentId does not exist.
InvalidSessionExceptionThe caller context is not associated with a valid session.
InvalidDynamicHierarchyOperationExceptionThe operation is not supported for dynamic hierarchies.
See Also