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
 Origin Forum
 How to get arguments for OriginExt methods?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ChemistryGuy

Australia
49 Posts

Posted - 03/04/2020 :  6:40:01 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2020 (64-bit) SR1 9.7.0.188 (Academic)
Operating System: Windows 10

Hi all,

I am trying to use the OriginExt library to control Origin from Python. Normally when I use a library in Python, I can look at the DocStrings to determine list of possible arguments for each method, and the meaning of each. For example in NumPy:



However, when I try this with OriginExt, there is no information available because there are no DocStrings set for this library:



Therefore I wanted to ask, does anyone have a resource (or any other method) for determining the acceptable arguments and their meanings?

Thanks and regards,

Conrad

ChemistryGuy

Australia
49 Posts

Posted - 03/04/2020 :  10:13:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
*Edited* I thought I had I worked this out, as the following page seems to contain the relevant information for some objects.

https://www.originlab.com/doc/COM/Classes

However, in some cases it does not list all available methods, so I cannot check the arguments. For example take the dataplots entry. From the intellisense in Python I know there is an "add" method for this object. But this method is not mentioned in the entry, or the example.

https://www.originlab.com/doc/COM/Classes/GraphLayer/DataPlots

So I am still searching for an answer to my original question: Is there any way to get an exhaustive list of all arguments for each method, and an explanation of what they do?

To mention my specific goal, I am trying to write a script that will merge selected graphs, and allow me to specify options. Eg, zero vertical spacing etc.

If there was a macro recorder within Origin this would have been a great help, as I could have used it to figure out the relevant code. But unless I am mistaken this does not exist. If anyone has any ideas of how to accomplish this particular goal I would be grateful to hear them.

I appreciate anyone's time and thank you in advance.

Edited by - ChemistryGuy on 03/05/2020 12:24:20 AM
Go to Top of Page

yuki_wu

896 Posts

Posted - 03/05/2020 :  03:33:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Conrad,

We have a document page about the “add” method of DataPlots, you might miss it somehow:
https://www.originlab.com/doc/COM/Classes/DataPlots?tdsourcetag=s_pcqq_aiomsg

I am sorry that we have neither a smart way to get the argument list and help file nor a macro recorder in Origin so far. For now, the document is the only way for us to search the methods, but we are starting to improve our programming document recently. If you have any comments, please feel free to let us know.

Regards, Yuki
OriginLab

Edited by - yuki_wu on 03/05/2020 03:33:59 AM
Go to Top of Page

ChemistryGuy

Australia
49 Posts

Posted - 03/05/2020 :  9:19:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Yuki,

Thanks for your reply and for letting me know about the plan to improve the documentation, I am looking forward to it.

As for comments about the programming documentation, I think one thing would be to consolidate duplicate pages. For instance, the reason I did not see the "add" method for the dataplots class is that there are two pages for this:

https://www.originlab.com/doc/COM/Classes/DataPlots
https://www.originlab.com/doc/COM/Classes/GraphLayer/DataPlots

And the page that I looked at did not have documentation for the "add" method. Both pages are about the same class, so I believe it would make more sense to just have one page.

Also I just wanted to double check, please would you let me know if it is possible to merge graphs using Python or any other programming method?
Go to Top of Page

yuki_wu

896 Posts

Posted - 03/06/2020 :  04:35:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Conard,

We don’t have a method for merging graphing, but we can use Application::Execute to execute a LabTalk script, like the python example of the following page:
https://www.originlab.com/doc/COM/Classes/Application/Execute

Using Application::Execute method, we can call X-Function merge_graph:
https://www.originlab.com/doc/X-Function/ref/merge_graph

Also, I will bring up your comments to our share meeting to see if we can do something to improve it.

Hope it helps.

Regards, Yuki
OriginLab
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