GetExternalOpenXml([Options: Integer = 0]): Object;
GetExternalOpenXml(Options: Integer): Object;
Options. This parameter is reserved for the future.
The GetExternalOpenXml method generates the XML structure containing parameters of opening object.
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.
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.
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(0) As 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: