IRdsSortAttributes.LoadFrom

Syntax

LoadFrom(Element: Variant);

Parameters

Element. Object, from which parameters of attribute values sorting will be loaded.

Description

The LoadFrom method loads parameters of attribute values sorting from XML.

Comments

Use the IRdsSortAttributes.SaveTo method to save attribute sorting parameters.

Example

Executing the example requires that the repository contains an MDM dictionary with the D_EXP_IMP identifier that contains import schemes. The file system must contain the file C:\SortAtt.xml, that stores options of filter applied to attribute values in export scheme of the dictionary in XML format.

Add links to the Metabase, Rds, and Xml system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    Dict: IRdsDictionary;
    sExport: IMetaRdsExportSchema;
    dictSort: IRdsSortAttributes;
    Doc: IXmlDomDocument;
Begin
    Mb := MetabaseClass.Active;
    // Get MDM dictionary
    Dict := Mb.ItemById("D_EXP_IMP").Edit As IRdsDictionary;
    // Get the first export scheme
    sExport := Dict.ExportSchemas.Item(0As IMetaRdsExportSchema;
    // Get sorting parameters
    dictSort := sExport.SortAttributes;
    // Load sorting parameters from file
    Doc := New DOMDocument.Create;
    Doc.load("C:\SortAtt.xml");
    dictSort.LoadFrom(Doc.documentElement);
    // Save the dictionary
    (Dict As IMetabaseObject).Save;
End Sub UserProc;

After executing the example attribute sorting parameters in the first export scheme are loaded from the file C:\SortAtt.xml.

See also:

IRdsSortAttributes