DIAdem Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Jesse_D

Programmatic copy function

Status: Completed

This feature for the REPORT-API was released with DIAdem 2015

Diadem currently has a copy function for curves within the user interface, as shown below: 

 

 

true.png

 

However, there is no copy function within the scripting api. This means to duplicate a curve programmatically multiple functions. one for each of the properties in the curve, need to be called as shown below: 

 

Dim oMyReportObj, oMyNew2DCurve,

Set oMyReportObj = Report.ActiveSheet.Objects.Item(1)

Set oMyNew2DCurve = oMyReportObj.Curves2D.Add(e2DShapeLine, oMyReportObj.Curves2D.Item(oMyReportObj.Curves2D.Count).Name &"_copy")
oMyNew2DCurve.Shape.XChannel.Reference = oMyReportObj.Curves2D.Item(oMyReportObj.Curves2D.Count-1).Shape.XChannel.Reference
oMyNew2DCurve.Shape.YChannel.Reference = oMyReportObj.Curves2D.Item(oMyReportObj.Curves2D.Count-1).Shape.YChannel.Reference
oMyNew2DCurve.Shape.Settings.Line.Width = eLineWidth0100

...

 

It would be far easier if there were a call to copy a curve directly: 

 

Dim oMyReportObj, oMyNew2DCurve,

Set oMyReportObj = Report.ActiveSheet.Objects.Item(1)

Set oMyNew2DCurve = oMyReportObj.Curves2D.Copy(1)

 

 

 

Jesse Dennis
Engineer
INTP
2 Comments
okubik
Active Participant

Hi,
it might be great to extend this idea and create this method for all DIAdem objects (such as entire graphs, labels, ...).

CLA, CTA, CLED
dietfons
Member
Status changed to: Completed

This feature for the REPORT-API was released with DIAdem 2015