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
 Text file import with semi-fixed columns
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2 Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 09/22/2020 :  07:24:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Just noticed the following code @ http://blog.originlab.com/creating-a-python-based-import-filter-with-origin-2021:
# These two lines will emulate the Import Filter file selection.
# Be sure to remove them prior to creating the Import Filter from this script.
tmp = op.file_dialog('*.log')
op.po.LT_execute('fname$=' + tmp)


What is op.po.?
Where can one read about this?

---
Andrey
Go to Top of Page

Chris D

428 Posts

Posted - 09/22/2020 :  10:30:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The originpro package is build on top of another package that is more of an underlying API type package.

originpro does not have the ability to execute LabTalk statements but the underlying API does.

This statement provides access to the underlying API to allow LabTalk to be called.


op.po.LT_execute('some labtalk statement')


We are reorganizing our docs in this area currently. So it is sort of "insider knowledge". We can mention this sort of thing when we release the docs closer to release of Origin 2021.

Thanks,
Chris Drozdowski
Originlab Technical Support
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 09/22/2020 :  3:35:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Chris D

The originpro package is build on top of another package that is more of an underlying API type package.

originpro does not have the ability to execute LabTalk statements but the underlying API does.

This statement provides access to the underlying API to allow LabTalk to be called.


op.po.LT_execute('some labtalk statement')


We are reorganizing our docs in this area currently. So it is sort of "insider knowledge". We can mention this sort of thing when we release the docs closer to release of Origin 2021.

Thanks,
Chris Drozdowski
Originlab Technical Support






---
Andrey
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 09/22/2020 :  3:48:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AKazak

What is op.po.?




We will add op.set_lt_str in beta6, somehow there was get_lt_str but no set_lt_str so Chris had to go around to lower level call.

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 09/24/2020 :  03:37:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

quote:
Originally posted by AKazak

What is op.po.?




We will add op.set_lt_str in beta6, somehow there was get_lt_str but no set_lt_str so Chris had to go around to lower level call.

CP



Good idea to implement the counterpart function.

---
Andrey
Go to Top of Page

snowli

USA
1426 Posts

Posted - 09/25/2020 :  4:07:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

We just announced beta6, which supports calling an extneral .py file in Import Wizard.

Could you try?
Image in Step2 of this blog reflect the change.
http://blog.originlab.com/creating-a-python-based-import-filter-with-origin-2021

Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 09/28/2020 :  11:24:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Hi Andrey,

We just announced beta6, which supports calling an extneral .py file in Import Wizard.

Could you try?
Image in Step2 of this blog reflect the change.
http://blog.originlab.com/creating-a-python-based-import-filter-with-origin-2021

Thanks, Snow



Thank you.
Works as expected in 2021 Beta 6.

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