DIAdem Help

Method: Copy for ReportObjects

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

Method: Copy for ReportObjects

Copies an object in DIAdem REPORT.

Set oReportObject = Object.Copy(NameOrIndex, NewName, InsertOnSheet)
ObjectReportObjects
Object with this method
NameOrIndexVariant
Specifies the name or the index of the object.
NewNameString
Specifies the name of the new object.
InsertOnSheetVariant
Specifies the name or index of the target worksheet.
oReportObjectReportObject
Returned object

The following example copies a frame:

VBScriptPython

 

Dim oMyObjects, oMyPosition, oMyFrame, oMyCopyFrame
Call Report.NewLayout()
Set oMyObjects = Report.ActiveSheet.Objects
Set oMyFrame = oMyObjects.Add(eReportObjectFrame,"MyFrame")
Set oMyCopyFrame = oMyObjects.Copy("MyFrame","MyFrame2",1)
Set oMyPosition = oMyCopyFrame.Position.ByBorder
oMyPosition.Left = 30
oMyPosition.Bottom = 30
oMyPosition.Height = 40
oMyPosition.Width = 40
Call Report.Refresh()

Log in to get a better experience