PixelHeight: Integer;
The PixelHeight property determines the height of the 3D scene in pixels.
Executing the example requires a form with a button named Button1 and a regular report with the Rep_1 identifier that contains a 3D scene object. Add links to the Chart, ExtCtrls, Drawing, Export, Forms, Metabase, Report, Tab system assemblies.
The example is a handler of the OnClick event for the button.
Sub Button1OnClick(Sender: Object; Args: IEventArgs);
Var
exp : IScene3DExporter;
tab : ITabObject;
mb : IMEtabase;
Begin
mb := MetabaseClass.Active;
exp := New Scene3DExporter.Create;
exp.Scene3D := ((mb.ItemById("Rep_1").Bind As IPrxReport).sheets.item(0) As IPrxTable).TabSheet.Objects.Item(0).Extension As IScene3D;
exp.PixelHeight := 500;
exp.PixelWidth := 500;
exp.ExportToFile("C:\temp\1.jpg","jpg");
exp.GetBitmap.SaveToFile("C:\2.jpg");
exp.Scale := 0.5;
End Sub Button1OnClick;
Clicking the button loads the graphic image of the 3D scene the file to be used in the regular report with the specified height and width in pixels and the specified scale.
See also: