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
 Operating OriginLab via Matlab
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

matt_haxem

USA
4 Posts

Posted - 03/06/2018 :  4:32:22 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release:Origin Pro 2017 b9.4.0.220
Operating System: Windows 7 Professional

Hi guys,

My task is simple. All I need to do primarily is move data from Matlab into Origin. One workbook, one worksheet, multiple columns. I already know how to open an instance of origin and create a workbook and move in the data using commands like 'invoke(wks, 'SetData', x, r, c)'. My issues are the following:

1. What command should I use to Save the new Untitled project that is in the Origin instance after moving in the data?

2. A more general question: How can I know which commands I can 'Execute' or call on Origin objects from Matlab? I see documentation online for LabTalk (which I don't think is what I need), but I'm having a lot of trouble finding out what other commands I can call with the various different Origin objects from Matlab (I only know what I do now from the 2 provided Origin-COM examples and a lot of trial and error).

Thanks and I hope someone can help point me in the right direction,

Matt

yuki_wu

896 Posts

Posted - 03/07/2018 :  12:52:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Matt,

I feel a little bit confused about your question.

Are you trying to connect to an Origin COM server from a MATLAB client? If yes, you could find the answer and some example in this book:
https://www.originlab.com/doc/COM

Hope it helps.

Regards,
Yuki
OriginLab
Go to Top of Page

matt_haxem

USA
4 Posts

Posted - 03/07/2018 :  7:18:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Yuki!

I have visited that website already, but maybe I am a little confused. In the 'Samples\COM Server and Client\MATLAB\' folder, there are only two examples present here. However, there are many more examples given for many of the other languages/platforms used. Why the disparity? Also, when you navigate that webpage you gave to 'http://www.originlab.com/doc/COM/Classes' and look at some of the examples given, none of them give examples in Matlab, but give many examples in Visual Basic, LabVIEW and C#. I am hoping to find more info specifically for Matlab usage.

Thanks for the help,

Matt
Go to Top of Page

yuki_wu

896 Posts

Posted - 03/07/2018 :  9:33:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Matt,

Sorry for the inconvenience. I will bring your comments to our share meeting to see if we can improve our document and provide more example in the future.

In the example, it in fact introduces a powerful method to executes a LabTalk script. For example, you could save the current project by
invoke(originObj, 'Execute', 'save D:\MATLABCallOrigin.opju;');

LabTalk can help to maintain most of Origin Object, use like:
invoke(The specific object you are going to do something on it, 'Execute', LabTalk Script);


Hope it can be some help.

Regards,
Yuki
OriginLab

Edited by - yuki_wu on 03/07/2018 9:33:49 PM
Go to Top of Page

AdrianG001

USA
2 Posts

Posted - 04/03/2018 :  12:01:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey,

You can refer the below video tutorial
originlab.com/Index.aspx?go=Support/VideoTutorials&pid=1778

Adrian Gates
Sr. Cloud Expert - Apps4Rent
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