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
 LabTalk Forum
 Passing values from Origin to Labview
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

31922A

Uzbekistan
Posts

Posted - 07/10/2006 :  09:44:37 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: Win XP

I'm trying to pass the names of the Origin worksheets into Labview. I'm using the labtalk function pe_dir("*","w"). I'm able to execute the labtalk script from labview and the command returns a list of origin worksheets to the origin script window but how can I get this list into labview?



Thanks in Advance.

Nick Argyros
nicka@idinet.com

easwar

USA
1965 Posts

Posted - 07/10/2006 :  4:14:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Nick,

What the pe_dir command (which is a script command that was implemented/added in 7.5 using an Origin C function - you can see the function in LT_pe.c file in Code Builder System tree) is to just print the window names to script window. The names are not saved in a string, they are just printed, and so you cannot "get" them from LavbVIEW.

You could instead pass the following script command using the OAExecute method:
%z="";doc -e W {%z=%z %h;};
This would use the doc LabTalk command to loop thru all worksheets and the names get added to the string %z
So %z in the end will contain a string such as "Data1 Data2 Data3..."

Then you can use the OAGetLTStr subVI in the Origin subVI collection to "get" the contents of %z into a LabVIEW string variable and do string parsing at the LabVIEW end to get the names.

If this does not suit your needs, please post again and specify what you are trying to acheive and we can think of perhaps a better solution.

Easwar
OriginLab


Go to Top of Page

31922A

Uzbekistan
Posts

Posted - 07/10/2006 :  5:12:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
That works great.

Thanks for the help.

Nick Argyros
nicka@idinet.com
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