IMetabaseObjectDescriptor.GetExternalOpenXml

Syntax

GetExternalOpenXml([Options: Integer = 0]): Object;

GetExternalOpenXml(Options: integer): object;

Parameters

Options. This parameter is reserved for the future.

Description

The GetExternalOpenXml method generates the XML structure containing parameters of opening object.

Comments

The obtained XML structure can be saved to the file with the *.PP extension and can be used to automatically open the object on starting Foresight Analytics Platform.

Example

Executing the example requires that the repository contains an object with the Report_1 identifier.

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

Sub UserProc;
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    TxtWriter: ITextWriter;
Begin
    MB := MetabaseClass.Active;
    MDesc := MB.ItemById("Report_1");
    TxtWriter := File.OpenTextWriter("C:\" + MDesc.Id + ".PP"True);
    TxtWriter.WriteString((MDesc.GetExternalOpenXml As IXmlDomElement).xml);
End Sub UserProc;

Imports Prognoz.Platform.Interop.ForeIO;
Imports Prognoz.Platform.Interop.MsXml2;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    FClass: File = New FileClass();
    TxtWriter: ITextWriter;
Begin
    MB := Params.Metabase;
    MDesc := MB.ItemById["Report_1"];
    TxtWriter := FClass.OpenTextWriter("C:\" + MDesc.Id + ".PP"True);
    TxtWriter.WriteString((MDesc.GetExternalOpenXml(0As IXmlDomElement).xml);
End Sub;

On executing the example the XML structure containing the parameters of automatic opening of the specified object will be generated and saved to the file.

See also:

IMetabaseObjectDescriptor