IMetabaseObjectDescriptor.GetExternalOpenXml

Fore Syntax

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

Fore.NET Syntax

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 *.PP extension and can be used for automatic open of the object on starting Prognoz Platform 9.

Fore Example

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

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;

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.

Fore.NET Example

Executing the example requires that the repository contains an object with the Report_1 identifier. The specified procedure is an entry point for the .NET assembly.

Imports Prognoz.Platform.Interop.ForeIO;
Imports Prognoz.Platform.Interop.Metabase;
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