IMetabaseUpdateContext.RegisterHierarchyChange

Fore Syntax

RegisterHierarchyChange(oldObjKey: Integer;

                        oldHieKey: Integer;

                        oldHieId: String;

                        newHieKey: Integer;

                        newHieId: String;

                        newObject: IMetabaseObject);

Fore.NET Syntax

RegisterHierarchyChange(oldObjKey: uinteger;

                        oldHieKey: uinteger;

                        oldHieId: string;

                        newHieKey: uinteger;

                        newHieId: string;

                        newObject: Prognoz.Platform.Interop.Metabase.IMetabaseObject);

Parameters

oldObjKey. Source dictionary key.

oldHieKey. Alternative hierarchy key in source dictionary.

oldHieId. Alternative hierarchy identifier in source dictionary.

newHieKey. Alternative hierarchy key in the consumer dictionary.

newHieId. Alternative hierarchy identifier in the consumer dictionary.

newObject. Consumer dictionary.

Description

The RegisterHierarchyChange method redetermines alternative hierarchy, to which refers updated object.

Comments

To redetermine alternative hierarchy taking into account updated object owner, use the IMetabaseUpdateContext.RegisterHierarchyChangeO method.

Fore Example

Executing the example requires that the repository contains table MDM dictionaries with the DM_INDICATOR_S and MDM_INDICATOR_D identifiers. These dictionaries must contain identical alternative hierarchies. The file system assumes the C:\RegHieChng.pefx update file used to update the MDM_INDICATOR_S dictionary.

Add links to the Dimensions, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Update: IMetabaseUpdate;
    Context: IMetabaseUpdateContext;
    sourceDim, targetDim: IMetabaseObject;
    sourceHieSrc, targetHieSrc: IMetabaseObject;
    sourceHierarchies, targetHierarchies: IDimHierarchies;
    sourceHierarchy, targetHierarchy: IDimHierarchy;
    i: Integer;
    KeyMap: IMetabaseUpdateKeyMap;
    UpdObjRemap: IMetabaseUpdateObjectRemapping;
Begin
    // Get current repository
    MB := MetabaseClass.Active;
    // Create an update
    Update := Mb.CreateUpdate;
    // Load update parameters from file
    Update.LoadFromFileNF("C:\RegHieChng.pefx", UpdateLoadMode.Replace);
    // Create additional update settings
    Context := Update.CreateUpdateContext;
    // Get dictionaries
    sourceDim := MB.ItemById("MDM_INDICATOR_S").Bind;
    targetDim := MB.ItemById("MDM_INDICATOR_D").Bind;
    // Get dictionary hierarchies
    sourceHierarchies := (sourceDim As IDimensionModel).Hierarchies;
    targetHierarchies := (targetDim As IDimensionModel).Hierarchies;
    // Go through source dictionary hierarchies
    For i := 0 To sourceHierarchies.Count - 1 Do
        // Get the current source dictionary hierarchy
        sourceHierarchy := sourceHierarchies.Item(i);
        // Search identical consumer dictionary hierarchy
        targetHierarchy := targetHierarchies.FindById(sourceHierarchy.Id);
        // If such hierarchy is found
        If (targetHierarchy <> NullThen
            // Redetermine alternative hierarchy, to which source dictionary refers.
            // It will refer to consumer dictionary alternative hierarchy
            context.RegisterHierarchyChange(sourceDim.Key, sourceHierarchy.Key, sourceHierarchy.Id,
                targetHierarchy.Key, targetHierarchy.Id, targetDim);
            // Get a dictionary used for alternative hierarchy in source dictionary    
            sourceHieSrc := sourceHierarchy.Source As IMetabaseObject;
            // Get a dictionary used for alternative hierarchy in consumer dictionary
            targetHieSrc := targetHierarchy.Source As IMetabaseObject;
            // Redetermine a dictionary used for building alternative hierarchy in source dictionary.
            // The dictionary will be used to build alternative hierarchy in consumer dictionary
            context.RegisterKeyChange(sourceHieSrc.ClassId, sourceHieSrc.Key, targetHieSrc.Key,
                sourceHieSrc.Id, targetHieSrc.Id, targetHieSrc);
            End If;
    End For;
    // Get map of keys used for repeated mapping of update objects
    KeyMap := Context.KeyMap;
    // Check if map is empty
    If Not KeyMap.IsEmpty Then
        // If map contains data, go through its elements
        For i := 0 To KeyMap.Count - 1 Do
            // Get parameters of repeated mapping of update object
            UpdObjRemap := KeyMap.Item(i);
            // Output information about parameters of repeated object mapping
            Debug.WriteLine("Repository object type: " + UpdObjRemap.ClassID.ToString);
            Debug.WriteLine("Whether several repeated mappings are allowed for objects: " + UpdObjRemap.HasMultiValues.ToString);
            Debug.WriteLine("New object identifier: " + UpdObjRemap.NewId);
            Debug.WriteLine("Old object identifier: " + UpdObjRemap.OldId);
            Debug.WriteLine("New object key: " + UpdObjRemap.NewKey.ToString);
            Debug.WriteLine("Old object key: " + UpdObjRemap.OldKey.ToString);
            Debug.WriteLine("Zero mapping is used: " + UpdObjRemap.NullRemapping.ToString);
            If UpdObjRemap.Object <> Null Then
                Debug.WriteLine("Consumer object used for repeated mapping: " + UpdObjRemap.Object.Name);
            End If;
            Debug.Write("Repeated mapping type: ");
            Select Case UpdObjRemap.Type
               Case MetabaseUpdateRemappingType.Unknown: Debug.WriteLine("unknown type");
                Case MetabaseUpdateRemappingType.Object: Debug.WriteLine("repository object");
                Case MetabaseUpdateRemappingType.Hierarchy: Debug.WriteLine("alternative hierarchy");
                Case MetabaseUpdateRemappingType.MetafactsAttribute: Debug.WriteLine("time series attributes");
                Case MetabaseUpdateRemappingType.MetavalsAttribute: Debug.WriteLine("observation attributes");
                Case MetabaseUpdateRemappingType.None: Debug.WriteLine("type is not set");
            End Select;
            Debug.WriteLine("");
        End For;
    End If;
    // Apply update
    Update.ApplyEx(Null, Context);
End Sub UserProc;

After executing the example the MDM_INDICATOR_S dictionary is updated. It will be set up to use alternative hierarchies of the MDM_INDICATOR_D dictionary.

Fore.NET Example

Imports Prognoz.Platform.Interop.Dimensions;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Update: IMetabaseUpdate;
    Context: IMetabaseUpdateContext;
    sourceDim, targetDim: IMetabaseObject;
    sourceHieSrc, targetHieSrc: IMetabaseObject;
    sourceHierarchies, targetHierarchies: IDimHierarchies;
    sourceHierarchy, targetHierarchy: IDimHierarchy;
    i: Integer;
    KeyMap: IMetabaseUpdateKeyMap;
    UpdObjRemap: IMetabaseUpdateObjectRemapping;
Begin
    // Get current repository
    MB := Params.Metabase;
    // Create an update
    Update := Mb.CreateUpdate();
    // Load update parameters from file
    Update.LoadFromFileNF("C:\RegHieChng.pefx", UpdateLoadMode.ulmReplace);
    // Create additional update settings
    Context := Update.CreateUpdateContext();
    // Get dictionaries
    sourceDim := MB.ItemById["MDM_INDICATOR_S"].Bind();
    targetDim := MB.ItemById["MDM_INDICATOR_D"].Bind();
    // Get dictionary hierarchies
    sourceHierarchies := (sourceDim As IDimensionModel).Hierarchies;
    targetHierarchies := (targetDim As IDimensionModel).Hierarchies;
    // Go through source dictionary hierarchies
    For i := 0 To sourceHierarchies.Count - 1 Do
        // Get the current source dictionary hierarchy
        sourceHierarchy := sourceHierarchies.Item[i];
        // Search identical consumer dictionary hierarchy
        targetHierarchy := targetHierarchies.FindById(sourceHierarchy.Id);
        // If such hierarchy is found
        If (targetHierarchy <> NullThen
            // Redetermine alternative hierarchy, to which source dictionary refers.
            // It will refer to consumer dictionary alternative hierarchy
            context.RegisterHierarchyChange(sourceDim.Key, sourceHierarchy.Key, sourceHierarchy.Id,
                targetHierarchy.Key, targetHierarchy.Id, targetDim);
            // Get dictionary used for alternative hierarchy in source dictionary
            sourceHieSrc := sourceHierarchy.Source As IMetabaseObject;
            // Get a dictionary used for alternative hierarchy in consumer dictionary
            targetHieSrc := targetHierarchy.Source As IMetabaseObject;
            // Redetermine a dictionary used for building alternative hierarchy in source dictionary.
            // The dictionary will be used to build alternative hierarchy in consumer dictionary
            context.RegisterKeyChange(sourceHieSrc.ClassId, sourceHieSrc.Key, targetHieSrc.Key,
                sourceHieSrc.Id, targetHieSrc.Id, targetHieSrc);
            End If;
    End For;
    // Get map of keys used for repeated mapping of update objects
    KeyMap := Context.KeyMap;
    // Check if map is empty
    If Not KeyMap.IsEmpty Then
        // If map contains data, go through its elements
        For i := 0 To KeyMap.Count - 1 Do
            // Get parameters of repeated mapping of update object
            UpdObjRemap := KeyMap.Item[i];
            // Output information about parameters of repeated object mapping
            System.Diagnostics.Debug.WriteLine("Repository object type: " + UpdObjRemap.ClassID.ToString());
            System.Diagnostics.Debug.WriteLine("Whether several mappings are allowed for object: " + UpdObjRemap.HasMultiValues.ToString());
            System.Diagnostics.Debug.WriteLine("New object identifier: " + UpdObjRemap.NewId);
            System.Diagnostics.Debug.WriteLine("Old object identifier: " + UpdObjRemap.OldId);
            System.Diagnostics.Debug.WriteLine("New object identifier: " + UpdObjRemap.NewKey.ToString());
            System.Diagnostics.Debug.WriteLine("Old object identifier: " + UpdObjRemap.OldKey.ToString());
            System.Diagnostics.Debug.WriteLine("Zero mapping is used: " + UpdObjRemap.NullRemapping.ToString());
            If UpdObjRemap.Object <> Null Then
                System.Diagnostics.Debug.WriteLine("Consumer object used for repeated mapping: " + UpdObjRemap.Object.Name);
            End If;
            System.Diagnostics.Debug.Write("Repeated mapping type: ");
            Select Case UpdObjRemap.Type
                Case MetabaseUpdateRemappingType.murtUnknown: System.Diagnostics.Debug.WriteLine("unknown type");
                Case MetabaseUpdateRemappingType.murtObject: System.Diagnostics.Debug.WriteLine("repository object");
                Case MetabaseUpdateRemappingType.murtHierarchy: System.Diagnostics.Debug.WriteLine("alternative hierarchy");
                Case MetabaseUpdateRemappingType.murtMetafactsAttribute: System.Diagnostics.Debug.WriteLine("time series attributes");
                Case MetabaseUpdateRemappingType.murtMetavalsAttribute: System.Diagnostics.Debug.WriteLine("observation attributes");
                Case MetabaseUpdateRemappingType.murtNone: System.Diagnostics.Debug.WriteLine("type is not set");
            End Select;
            System.Diagnostics.Debug.WriteLine("");
        End For;
    End If;
    // Apply update
    Update.ApplyEx(Null, Context);
End Sub;Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Update: IMetabaseUpdate;
    Context: IMetabaseUpdateContext;
    sourceDim, targetDim: IMetabaseObject;
    sourceHieSrc, targetHieSrc: IMetabaseObject;
    sourceHierarchies, targetHierarchies: IDimHierarchies;
    sourceHierarchy, targetHierarchy: IDimHierarchy;
    i: Integer;
    KeyMap: IMetabaseUpdateKeyMap;
    UpdObjRemap: IMetabaseUpdateObjectRemapping;
Begin
    // Get current repository
    MB := Params.Metabase;
    // Create an update
    Update := Mb.CreateUpdate();
    // Load update parameters from file
    Update.LoadFromFileNF("C:\RegHieChng.pefx", UpdateLoadMode.ulmReplace);
    // Create additional update settings
    Context := Update.CreateUpdateContext();
    // Get dictionaries
    sourceDim := MB.ItemById["MDM_INDICATOR_S"].Bind();
    targetDim := MB.ItemById["MDM_INDICATOR_D"].Bind();
    // Get dictionary hierarchies
    sourceHierarchies := (sourceDim As IDimensionModel).Hierarchies;
    targetHierarchies := (targetDim As IDimensionModel).Hierarchies;
    // Go through source dictionary hierarchies
    For i := 0 To sourceHierarchies.Count - 1 Do
        // Get the current source dictionary hierarchy
        sourceHierarchy := sourceHierarchies.Item[i];
        // Search identical consumer dictionary hierarchy
        targetHierarchy := targetHierarchies.FindById(sourceHierarchy.Id);
        // If such hierarchy is found
        If (targetHierarchy <> NullThen
            // Redetermine alternative hierarchy, to which source dictionary refers.
            // It will refer to consumer dictionary alternative hierarchy
            context.RegisterHierarchyChange(sourceDim.Key, sourceHierarchy.Key, sourceHierarchy.Id,
                targetHierarchy.Key, targetHierarchy.Id, targetDim);
            // Get dictionary used for alternative hierarchy in source dictionary
            sourceHieSrc := sourceHierarchy.Source As IMetabaseObject;
            // Get a dictionary used for alternative hierarchy in consumer dictionary
            targetHieSrc := targetHierarchy.Source As IMetabaseObject;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">//&nbsp;Redetermine&nbsp;dictionary&nbsp;used&nbsp;for&nbsp;building&nbsp;alternative&nbsp;hierarchy&nbsp;in&nbsp;source dictionary.<br/> </font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">//&nbsp;Whether&nbsp;dictionary&nbsp;is used&nbsp;for&nbsp;building&nbsp;alternative&nbsp;hierarchy&nbsp;in&nbsp;consumer&nbsp;dictionary<br/> </font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context.RegisterKeyChange(sourceHieSrc.ClassId,&nbsp;sourceHieSrc.Key,&nbsp;targetHieSrc.Key,<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sourceHieSrc.Id,&nbsp;targetHieSrc.Id,&nbsp;targetHieSrc);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">End</font>&nbsp;<font color="#008080">If</font>;<br/> &nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">End</font>&nbsp;<font color="#008080">For</font>;<br/> &nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">//&nbsp;Get&nbsp;map&nbsp;of keys&nbsp;used&nbsp;for&nbsp;repeated&nbsp;mapping of&nbsp;update&nbsp;objects<br/> </font>&nbsp;&nbsp;&nbsp;&nbsp;KeyMap&nbsp;:=&nbsp;Context.KeyMap;<br/> &nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">//&nbsp;Check&nbsp;if&nbsp;map&nbsp;is&nbsp;empty<br/> </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">If</font>&nbsp;<font color="#008080">Not</font>&nbsp;KeyMap.IsEmpty&nbsp;<font color="#008080">Then</font><br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">//&nbsp;If&nbsp;map&nbsp;contains&nbsp;data,&nbsp;go through&nbsp;its&nbsp;elements<br/> </font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">For</font>&nbsp;i&nbsp;:=&nbsp;<font color="#008000">0</font>&nbsp;<font color="#008080">To</font>&nbsp;KeyMap.Count&nbsp;-&nbsp;<font color="#008000">1</font>&nbsp;<font color="#008080">Do</font><br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">//&nbsp;Get&nbsp;parameters&nbsp;of repeated&nbsp;mapping of&nbsp;update&nbsp;object<br/> </font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UpdObjRemap&nbsp;:=&nbsp;KeyMap.Item[i];<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">//&nbsp;Output&nbsp;information&nbsp;about&nbsp;parameters&nbsp;of repeated&nbsp;object&nbsp;mapping<br/> </font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;Repository&nbsp;object&nbsp;type:&nbsp;&quot;</font>&nbsp;+&nbsp;UpdObjRemap.ClassID.ToString());<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;Whether&nbsp;several&nbsp;repeated&nbsp;mappings&nbsp;are allowed&nbsp;for object:&nbsp;&quot;</font>&nbsp;+&nbsp;UpdObjRemap.HasMultiValues.ToString());<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;New&nbsp;object&nbsp;identifier:&nbsp;&quot;</font>&nbsp;+&nbsp;UpdObjRemap.NewId);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;Old&nbsp;object&nbsp;identifier:&nbsp;&quot;</font>&nbsp;+&nbsp;UpdObjRemap.OldId);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;New&nbsp;object&nbsp;key:&nbsp;&quot;</font>&nbsp;+&nbsp;UpdObjRemap.NewKey.ToString());<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;Old&nbsp;object&nbsp;key:&nbsp;&quot;</font>&nbsp;+&nbsp;UpdObjRemap.OldKey.ToString());<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;Zero&nbsp;mapping&nbsp;is used:&nbsp;&quot;</font>&nbsp;+&nbsp;UpdObjRemap.NullRemapping.ToString());<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">If</font>&nbsp;UpdObjRemap.Object&nbsp;&lt;&gt;&nbsp;<font color="#008080">Null</font>&nbsp;<font color="#008080">Then</font><br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;Consumer&nbsp;object&nbsp;used&nbsp;for&nbsp;repeated&nbsp;mapping:&nbsp;&quot;</font>&nbsp;+&nbsp;UpdObjRemap.Object.Name);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">End</font>&nbsp;<font color="#008080">If</font>;<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.Write(<font color="#800000">&quot;Repeated&nbsp;mapping&nbsp;type:&nbsp;&quot;</font>);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">Select</font>&nbsp;<font color="#008080">Case</font>&nbsp;UpdObjRemap.Type<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">Case</font>&nbsp;MetabaseUpdateRemappingType.murtNone:&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;type&nbsp;is not&nbsp;set&quot;</font>);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">Case</font>&nbsp;MetabaseUpdateRemappingType.murtObject:&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;repository&nbsp;object&quot;</font>);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">Case</font>&nbsp;MetabaseUpdateRemappingType.murtHierarchy:&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;alternative&nbsp;hierarchy&quot;</font>);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">Case</font>&nbsp;MetabaseUpdateRemappingType.murtMetafactsAttribute:&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;time&nbsp;series&nbsp;attributes&quot;</font>);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">Case</font>&nbsp;MetabaseUpdateRemappingType.murtMetavalsAttribute:&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;observation&nbsp;attributes&quot;</font>);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">End</font>&nbsp;<font color="#008080">Select</font>;<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Diagnostics.Debug.WriteLine(<font color="#800000">&quot;&quot;</font>);<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">End</font>&nbsp;<font color="#008080">For</font>;<br/> &nbsp;&nbsp;&nbsp;&nbsp;<font color="#008080">End</font>&nbsp;<font color="#008080">If</font>;<br/> &nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">//&nbsp;Apply&nbsp;update<br/> </font>&nbsp;&nbsp;&nbsp;&nbsp;Update.ApplyEx(<font color="#008080">Null</font>,&nbsp;Context);<br/> <font color="#008080">End</font>&nbsp;<font color="#008080">Sub</font>;

See also:

IMetabaseUpdateContext