Hi,
I'm trying to 'copy and paste' the data from curve 1 to a new curve in the same plot using a macro. The code I have is..
>
SelectCurve(1)
CopyText()
Paste()
>
But either nothing gets copied to the clipboard or DPlot crashes, I'm using version 2.3.4.3. What am I doing wrong?
Thanks,
Rod
Macro to copy and paste curve to same plot
Moderator: DPlotAdmin
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
I've no idea. I tried this just now and it worked fine. Can you save your graph as a DPlot file and send it to me?What am I doing wrong?
Visualize Your Data
support@dplot.com
support@dplot.com
Re: Macro to copy and paste curve to same plot
Hi,
I tried the code snippet with a test plot containing 4 points and it copied and pasted without problems. When I try with the actual data, it fails to copy. Could it be a problem using data copied from another plot file? If I copy the data to a new plot using the edit:Move/Copy Curves command, then either the SelectCurve(1) or CopyText() commands do not work (I can't tell where the Macro stops). There's nothing in the clipboard.
This is the complete code listing of the Macro I'm trying to create:
It's a simple code to create an FFT of a roundness plot. I'm using the EditOperate() and CombineCurves() commands to create 16 repeats of the original curve and then carry out an FFT to find the order components of the out of roundness. I have measurement points at 0.5 degree intervals, hence 721 points per dataset. Needless to say I have a large number of roundness datasets to process and I would like to use a macro to speed the process up.
Best Regards,
Rod
I tried the code snippet with a test plot containing 4 points and it copied and pasted without problems. When I try with the actual data, it fails to copy. Could it be a problem using data copied from another plot file? If I copy the data to a new plot using the edit:Move/Copy Curves command, then either the SelectCurve(1) or CopyText() commands do not work (I can't tell where the Macro stops). There's nothing in the clipboard.
This is the complete code listing of the Macro I'm trying to create:
Code: Select all
EditOperateX("x/360+0.5")
SelectCurve(1)
CopyText()
Paste()
SelectCurve(2)
EditOperateX("x+1")
CombineCurves(1,2,1,0)
SelectCurve(1)
CopyText()
Paste()
SelectCurve(2)
EditOperateX("x+2")
CombineCurves(1,2,1,0)
SelectCurve(1)
CopyText()
Paste()
SelectCurve(2)
EditOperateX("x+4")
CombineCurves(1,2,1,0)
SelectCurve(1)
CopyText()
Paste()
SelectCurve(2)
EditOperateX("x+8")
CombineCurves(1,2,1,0)
FFTMethod(1)
SelectCurve(1)
FFT()
Best Regards,
Rod
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
I threw together an example and used your macro and it all worked fine, up until the FFT() command - which did nothing. It failed because the points are not evenly-spaced (but it won't tell you that when running from a macro). You can easily confirm whether that's the problem by running your macro, then manually trying an FFT.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact: