DIAdem Help

Method: ExportToImage for Circle

  • Updated2024-09-12
  • 1 minute(s) read

Method: ExportToImage for Circle

Exports a circle from DIAdem REPORT to a graphics file.

Object.ExportToImage(FileName, ImageType)
ObjectCircle
Object with this method
FileNameString
Specifies the path and the filename of the graphics file.
ImageTypeSpecifies the graphics file type.
Enumeration with the following selection terms:
1 eImageExportTypeEMFEMF file
2 eImageExportTypePNGPNG file
3 eImageExportTypeJPGJPG file
4 eImageExportTypeGIFGIF file
5 eImageExportTypeTIFTIF file

The following example adds a circle to the current worksheet, changes the display of the circle, and then exports the circle into the graphics file MyCircle.png:

VBScriptPython

 

Dim oMyCircle, oMyBackgroundColor, oMyBorderLineColor
Set oMyCircle = Report.ActiveSheet.Objects.Add(eReportObjectCircle,"MyCircle")

oMyCircle.ForceCircle = True

Set oMyBackgroundColor = oMyCircle.BackgroundColor
Call oMyBackgroundColor.SetPredefinedColor(eColorIndexRed )
oMyBackgroundColor.Transparency = 50

oMyCircle.Position.ByCoordinate.X1 = 10
oMyCircle.Position.ByCoordinate.X2 = 40
oMyCircle.Position.ByCoordinate.Y1 = 50
oMyCircle.Position.ByCoordinate.Y2 = 80

Set oMyBorderLineColor = oMyCircle.BorderLine.Color
Call oMyBorderLineColor.SetPredefinedColor(eColorIndexGreen)
oMyCircle.BorderLine.LineType = eLineTypeDotted
oMyCircle.BorderLine.Width = eLineWidth0140

Report.Settings.ImageExport.PNG.BitsPerPixel = ePNGBitsPerPixelRGB24
Report.Settings.ImageExport.PNG.Height = 300
Report.Settings.ImageExport.PNG.UseRatio = True
Call oMyCircle.ExportToImage(LayoutWritePath & "MyCircle", eImageExportTypePNG)