IRdsSortAttributes.SaveTo

Syntax

SaveTo(Element: Variant);

Parameters

Element. Object, to which sorting parameters will be saved as XML code.

Description

The SaveTo method saves parameters of attributes values' sorting as XML code.

Comments

Use the IRdsSortAttributes.LoadFrom method to load sorting parameters from XML.

Example

Executing the example requires that the repository contains an MDM dictionary with the D_EXP_IMP identifier that contain import schemes.

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

Sub UserProc;
Var
    Mb: IMetabase;
    dictObj: IMetabaseObject;
    Dict: IRdsDictionary;
    sExport: IMetaRdsExportSchema;
    dictSort: IRdsSortAttributes;
    Doc: IXmlDomDocument;
    Element: IXmlDomElement;
Begin
    Mb := MetabaseClass.Active;
    // Get MDM dictionary
    dictObj := Mb.ItemById("D_EXP_IMP").Bind;
    Dict := dictObj As IRdsDictionary;
    // Get the first export scheme
    sExport := Dict.ExportSchemas.Item(0As IMetaRdsExportSchema;
    // Get sorting parameters
    dictSort := sExport.SortAttributes;
    // Save parameters to file
    Doc := New DOMDocument.Create;
    Element := Doc.createElement("SortAtt");
    dictSort.SaveTo(Element);
    Doc.appendChild(Element);
    Doc.save("C:\SortAtt.xml");
End Sub UserProc;

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

See also:

IRdsSortAttributes