The Origin Forum
File Exchange
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 How to get the active Origin folder's name

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
codexplorer Posted - 02/28/2016 : 5:02:03 PM
Origin Ver. and Service Release: 9.1.0, 64 bit
Operating System: Windows 7

I am trying to get the name of the active folder in the Origin instance that my LabVIEW code is connected to.
The following page: http://www.originlab.com/doc/LabTalk/guide/String-registers lists a number of codes which can be used with the IOApplication Invoke Node to get a few useful objects' names. For instance, the snapshot below shows how to get the name of the folder in which the project is saved (which is not what I am interested in, I am talking about the internal folder structure of the Origin project):



I can't seem to find one that would correspond to what I am looking for.
5   L A T E S T    R E P L I E S    (Newest First)
codexplorer Posted - 03/04/2016 : 12:07:34 PM
Thanks, this worked fine.
For those who wonder, the first invoke node is the "execute" method, and the second, "LTStr(get)".
jasonzhao Posted - 03/04/2016 : 01:46:11 AM
Hello,

You can modify your LabVIEW Block Diagram in this way:



Best regards!
Jason
OriginLab Technical Service
codexplorer Posted - 03/03/2016 : 11:19:37 PM
So I tried this:



and got an empty string, whatever folder is active in the Origin project I am communicating with. The script seems to be working fine within Origin.
Note: The glasses+String VI is a utility to cast a Variant to a String.
codexplorer Posted - 03/03/2016 : 9:18:06 PM
OK, I'll try that.
cpyang Posted - 02/29/2016 : 4:40:17 PM
Origin System String Registers do not have one for Active Folder name. You will need to run LabTalk code to call pe_path X-Function to obtain the full path of the current folder and then get the last token. We have an upcoming Origin2016 SR2 that will have this readily available in a string register "%@F" though.

CP

The Origin Forum © 2008 Originlab Corporation Go To Top Of Page
Snitz Forums 2000