IMsFormulaTransform.SaveToXml

Syntax

SaveToXml(Xml: IXMLDOMElement);

Parameters

Xml. Object, to which the model parameters are output.

Description

The SaveToXml method saves model parameters to XML.

Example

Executing the example requires that the repository contains a modeling container with the MS identifier containing a model with the OBJ_MODEL identifier.

Add links to the Metabase, Ms, Xml system assemblies.

Sub UserProc;
Var
    model: IMsModel;
    node: IXmlDomElement;
    mb: IMetabase;
    cl: FreeThreadedDOMDocument60;
    msKey: Integer;
Begin
    mb := MetabaseClass.Active;
    msKey := mb.ItemById(
"MS").Key;
    model := (mb.ItemByIdNamespace(
"OBJ_MODEL", msKey)).Bind As IMsModel;
    cl := 
New FreeThreadedDOMDocument60.Create;
    node := cl.createElement((model 
As IMetabaseObjectDescriptor).Id);
    cl.appendChild(node);
    model.Transform.SaveToXml(node);
    Debug.WriteLine(node.xml);
End Sub UserProc;

After executing the example the OBJ_MODEL model parameters represented as XML code are displayed in the Memo1 component.

See also:

IMsFormulaTransform