Diadem currently has a copy function for curves within the user interface, as shown below:
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This feature for the REPORT-API was released with DIAdem 2015