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 the *.PP extension and can be used to automatically open the object on starting Foresight Analytics Platform.
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(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: