Key: Integer;
The Key property returns a key of a scene series.
Executing the example requires a 3D scene in the regular report with the REGULAR_REPORT identifier, and data in the cells B1:E3. Set a random data source for the 3D scene. Add links to the Metabase, Report, Tab, Drawing system assemblies.
Sub UserProc;
Var
Report: IPrxReport;
Chart: IPrxScene3D;
Tab: ITabSheet;
MB: IMetabase;
Ser: IPrxScene3DSerie;
Begin
//Connect regular report
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
Tab := (Report.Sheets.Item(0) As IPrxTable).TabSheet;
Chart := Tab.Objects.Item(0).Extension As IPrxScene3D;
Ser := Chart.Series.Item(0);
//Determine range of series values along the OX, OY, OZ axes
Ser.X := "B1:E1";
Ser.Y := "B2:E2";
Ser.Z := "B3:E3";
//Fill cells of series values along the OX, OY, OZ axes with set colors
Ser.XRange.Style.BackgroundColor := New GxColor.CreateRGB(255, 0, 0);
Ser.YRange.Style.BackgroundColor := New GxColor.CreateRGB(0, 255, 0);
Ser.ZRange.Style.BackgroundColor := New GxColor.CreateRGB(0, 0, 255);
//Display key and scene series type into set report cells
Tab.CellValue(1, 6) := Ser.Key;
Tab.CellValue(2, 6) := Ser.Type;
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the data source range is changed, the background of cells with values is filled with set colors, the key and the value of scene series type are displayed into the specified cells.
See also: