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 do I get the name and path of the project?

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 - 01/11/2016 : 2:44:16 PM
Origin Ver. and Service Release (Select Help-->About Origin): 9.1 sr1
Operating System: Windows 7 64 bit

I am trying to get the name and path of the origin project I am working with after I started a session using OA_ConnectToOrigin.vi

The property "Name" returns "Origin8.1" which is not even the version of the Origin I am using.
Trying the ProjectInfo item (for which there is zero info on OriginLab's site: http://www.originlab.com/doc/COM/Classes/Application/ProjectInfo), its properties : "Name" and "LongName" return empty strings.
Not sure what to try next...
6   L A T E S T    R E P L I E S    (Newest First)
mowerright215 Posted - 06/27/2016 : 07:58:08 AM
Thanks for the links.


quote:
Originally posted by codexplorer

Actually, according to the doc (http://www.originlab.com/doc/COM/Classes/Application/LTStr), the path is obtained with %Y, but anyway, thanks for the lead.
I wonder whether there are other magic codes to be found (in the LabTalk doc presumably)?

Edit: indeed, they can be found here: http://www.originlab.com/doc/LabTalk/guide/String-registers



[url=http://www.compensationlawyers-sydney.net.au]compensation lawyers Sydney
Castiel Posted - 02/01/2016 : 8:40:02 PM
quote:
Originally posted by codexplorer

You're correct. I must have read the doc with crossed eyes...

BTW, here is how your signature looks like on my browser:





About the signature, ASCII art. Though the encoding should be GB2312, not UTF-8, not latin-1. In IE11, right click on this page, select Encoding->More->Chinese Simplified (GB2312) or Chinese Simplified (GB18030).

c   ȥ  fuc  c    Τ  c/     
 cʥ       ' ̩   /  թf
                            `    
                              
codexplorer Posted - 02/01/2016 : 12:58:21 PM
You're correct. I must have read the doc with crossed eyes...

BTW, here is how your signature looks like on my browser:

Castiel Posted - 01/31/2016 : 8:01:07 PM
quote:
Originally posted by codexplorer

Actually, according to the doc (http://www.originlab.com/doc/COM/Classes/Application/LTStr), the path is obtained with %Y, but anyway, thanks for the lead.
I wonder whether there are other magic codes to be found (in the LabTalk doc presumably)?

Edit: indeed, they can be found here: http://www.originlab.com/doc/LabTalk/guide/String-registers



%Y is "User Files Folder". I'm afraid it's not the very string register you should use. It happens to be correct just because you save the project there. Try to save it in other place and you will see how it works.

c   ȥ  fuc  c    Τ  c/     
 cʥ       ' ̩   /  թf
                            `    
                              
codexplorer Posted - 01/29/2016 : 12:42:31 PM
Actually, according to the doc (http://www.originlab.com/doc/COM/Classes/Application/LTStr), the path is obtained with %Y, but anyway, thanks for the lead.
I wonder whether there are other magic codes to be found (in the LabTalk doc presumably)?

Edit: indeed, they can be found here: http://www.originlab.com/doc/LabTalk/guide/String-registers
Castiel Posted - 01/29/2016 : 05:10:49 AM
quote:
Originally posted by codexplorer

Origin Ver. and Service Release (Select Help-->About Origin): 9.1 sr1
Operating System: Windows 7 64 bit

I am trying to get the name and path of the origin project I am working with after I started a session using OA_ConnectToOrigin.vi

The property "Name" returns "Origin8.1" which is not even the version of the Origin I am using.
Trying the ProjectInfo item (for which there is zero info on OriginLab's site: http://www.originlab.com/doc/COM/Classes/Application/ProjectInfo), its properties : "Name" and "LongName" return empty strings.
Not sure what to try next...



It's been years since my last time using LabVIEW. Here I suppose you should have had a try of OAGetLTStr,
1) to get the project path, the name should be string "%X";
2) to get the project name, the name should be string "%G";

c   ȥ  fuc  c    Τ  c/     
 cʥ       ' ̩   /  թf
                            `    
                              

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