The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Duplicate (Batch Plotting) from OC
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

turbvg

Germany
9 Posts

Posted - 06/02/2015 :  06:09:44 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin 2015 64 bits b9.2.214
Operating System: Windows 7

Hi

I was wondering if there was an easy to use the new Duplicate (Batch Plotting) function that comes with Origin 2015 directly from an Origin C macro.

What I want to do exactly : I have a graph, and my current macro does the following :
  • The user selects two points on the graph which delimite a time interval.
  • The workbook from which the graph was made is copied into a new subfolder, and only the data in the selected time interval is kept.
  • A certain number of operations are made to those data

Afterwards, I use duplicate (batch plotting) to create a new graph identical to the original graph, but with the truncated and modified data.

So I was wondering if there is an easy way to automate this last portion.

Thanks



--
Origin 2015
Windows 7

jasonzhao

China
262 Posts

Posted - 06/04/2015 :  9:49:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

Would you please send the .OPJ file and .c file to tech@originlab.com for us to check how to make the improvement?


Best regards!
Jason
OriginLab Technical Service

Go to Top of Page

turbvg

Germany
9 Posts

Posted - 06/12/2015 :  10:20:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello
After discussing with customer support, we came up with a partial solution : one cannot directly use the duplicate (batch ploting) from OC macros, but this solution should get you around :
  • Some code to select the correct graph page and set it as active page in the project
  • LT_execute("domenu 33136");
  • This will open the duplicate (batch plotting) dialog box.
  • You have to manually select the desired data file and clic OK.
  • [*] The advantage of this solution is that the dialog box is opened on the right window, and that tha macro is not ended by the dialog box : once you've pressed OK, the macros goes on, and can execute new code that you have written below LT_execute (like formatting code for example).


I hope it will be useful.


--
Origin 2015
Windows 7
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000