Method: Add for ReportObjects

DIAdem 2018 Help


Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)


DIAdem 2012 Help
DIAdem 2014 Help
DIAdem 2015 Help
DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help

Adds a new object to a worksheet in DIAdem REPORT.

Set oReportObject = Object.Add(objType, Name)
ObjectReportObjects
Object with this method
objTypeSpecifies the type of the object.
Enumeration with the following selection terms:
0eReportObject2DAxisSystem2D axis system
1eReportObject2DTable2D table
2eReportObjectPolarSystemPolar axis system
3eReportObject3DAxisSystem3D axis system
4eReportObject3DTable3D table
5eReportObjectTextText
6eReportObjectFrameFrame
7eReportObjectImageGraphic
8eReportObjectRTFTextText object
9eReportObjectArrowLine and arrow
10eReportObjectCommentComment
11eReportObjectCircleCircle
12eReportObjectFormulaDisplayFormula graphic
13eReportObjectSpiderSpider axis system
NameString
Specifies the name of the added object. If you transfer an empty string, DIAdem automatically specifies the name.
oReportObjectReportObject
Returned object

The following example checks whether an object with the name MyCircle already exists. If the object does not exist, the example adds a circle to the current worksheet:

Dim oMyCircle
If Report.ActiveSheet.Objects.Exists("MyCircle") then
  MsgBoxDisp("Object ""MyCircle"" already exists.")
Else
  Set oMyCircle = Report.ActiveSheet.Objects.Add(eReportObjectCircle,"MyCircle")
  oMyCircle.Position.ByBorder.Left = 30
  oMyCircle.Position.ByBorder.Bottom = 30
  oMyCircle.Position.ByBorder.Height = 40
  oMyCircle.Position.ByBorder.Width = 40
  Call oMyCircle.BackgroundColor.SetPredefinedColor(eColorIndexBlue)
  Call oMyCircle.BorderLine.Color.SetPredefinedColor(eColorIndexRed)
  Call Report.Refresh()
End If

WAS THIS ARTICLE HELPFUL?

Not Helpful