SaveStyleToXml: String;
SaveStyleToXml(): System.String;
The SaveStyleToXml method saves parameters of visualizer style to XML file.
Executing the example requires that the repository contains an express report with the EXP identifier. The module containing the example should have links to the Express, Metabase, Drawing and Visualizators system assemblies. The selected procedure should be called from the Main entry point.
Before executing this example, the bubble tree looks as shown on the IVZBubbleTree interface description page. Let get style parameters in XML format for the bubble tree, change the color of orbits and set changed style parameters from XML file:
Sub UserProc;
Var
Metabase: IMetabase; // Metabase
EaxAnalyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
BubbleTreeStyleXML: String; // Bubble tree style settings in XML format
Begin
// Get metabase object
Metabase := MetabaseClass.Active;
// Get express report object
EaxAnalyzer := Metabase.ItemById("EXP").Edit As IEaxAnalyzer;
// Get bubble tree
BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
// Get bubble tree style settings in XML format and change orbits color
BubbleTreeStyleXML := String.Replace(BubbleTree.SaveStyleToXml,
"OrbitsPen Style=""solid"" Color=""#ffe0e0e0""",
"OrbitsPen Style=""solid"" Color=""#ff000000""");
// Set new values for bubble tree style settings from XML file
BubbleTree.LoadStyleFromXml(BubbleTreeStyleXML);
// Save express report
(EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, the color of orbits is changed:
Executing the example requires that the repository contains an express report with the EXP identifier. The selected procedure is the Main entry point in the Program module of the .NET assembly. The Express, Metabase, Drawing and Visualizators assemblies should be imported to this module from the Prognoz.Platform.Interop system assembly.
Before executing this example, the bubble tree looks as shown on the IVZBubbleTree interface description page. Get style parameters in XML format for the bubble tree, change the color of orbits and set changed style parameters from XML file:
Public Shared Sub Main(Params: StartParams);
Var
Metabase: IMetabase; // Metabase
EaxAnalyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
BubbleTreeStyleXML: String; // Bubble tree style settings in XML format
Begin
// Get metabase object
Metabase := Params.Metabase;
// Get express report object
EaxAnalyzer := Metabase.ItemById["EXP"].Edit() As IEaxAnalyzer;
// Get bubble tree
BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
// Get bubble tree style settings in XML format and change orbits color
BubbleTreeStyleXML := BubbleTree.SaveStyleToXml().Replace(
"OrbitsPen Style=""solid"" Color=""#ffe0e0e0""",
"OrbitsPen Style=""solid"" Color=""#ff000000""");
// Set new values for bubble tree style settings from XML file
BubbleTree.LoadStyleFromXml(BubbleTreeStyleXML);
// Save express report
(EaxAnalyzer As IMetabaseObject).Save();
End Sub;
The result of the executed example is the same as that, executed for Fore language.
See also: