DIAdem Help

Method: Copy for 3DCurves

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

Method: Copy for 3DCurves

Copies a curve in a 3D axis system in DIAdem REPORT and adds this curve to the axis system.

Set o3DCurve = Object.Copy(NameOrIndex, NewName, InsertBeforeNameOrIndex)
Object3DCurves
Object with this method
NameOrIndexVariant
Specifies the name or the index of the curve that is to be copied.
NewNameString
Specifies the new name of the curve.
InsertBeforeNameOrIndexVariant
Specifies the name or the index of the curve before which DIAdem inserts the curve. If you specify the index 0 or "", DIAdem copies the curve and inserts it behind the last curve.
o3DCurve3DCurve
Returned object

The following example creates a 3D axis system with two curves, copies the first curve and inserts this curve into the axis system before the first curve:

VBScriptPython

 

Dim oMy3DAxisSys, oMyPosition, oMyCurve1, oMyCurve2, oMy3DCurves
Call Data.Root.Clear()
Call DataFileLoad(DataReadPath & "Report_Data.tdm","TDM","")
Call Report.NewLayout()
Set oMy3DAxisSys = Report.ActiveSheet.Objects.Add(eReportObject3DAxisSystem,"My3DAxisSystem")
Set oMyPosition = oMy3DAxisSys.Position.ByBorder
oMyPosition.Top = 30
oMyPosition.Bottom = 20
oMyPosition.Left = 20
oMyPosition.Right = 30
Set oMyCurve1 = oMy3DAxisSys.Curves3D.Add(e3DShapeLine, "MyNewCurve1")
oMyCurve1.Shape.XChannel.Reference= "[3]/[1]"
oMyCurve1.Shape.YChannel.Reference = "[3]/[2]"
oMyCurve1.Shape.ZChannel.Reference = "[3]/[3]"
Set oMy3DCurves = oMy3DAxisSys.Curves3D
Set oMyCurve2 = oMy3DCurves.Copy("MyNewCurve1","NewCurve2",1)
Call MsgBox("Number of curves: " & oMy3DCurves.Count)
Call Report.Refresh()

Log in to get a better experience