The Origin Forum
File Exchange
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 How do I get the name and path of the project?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

codexplorer

USA
13 Posts

Posted - 01/11/2016 :  2:44:16 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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...

Castiel

267 Posts

Posted - 01/29/2016 :  05:10:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
                            `    
                              
Go to Top of Page

codexplorer

USA
13 Posts

Posted - 01/29/2016 :  12:42:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - codexplorer on 01/29/2016 12:53:23 PM
Go to Top of Page

Castiel

267 Posts

Posted - 01/31/2016 :  8:01:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
                            `    
                              
Go to Top of Page

codexplorer

USA
13 Posts

Posted - 02/01/2016 :  12:58:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You're correct. I must have read the doc with crossed eyes...

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


Edited by - codexplorer on 02/01/2016 12:59:55 PM
Go to Top of Page

Castiel

267 Posts

Posted - 02/01/2016 :  8:40:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
                            `    
                              
Go to Top of Page

mowerright215

Australia
1 Posts

Posted - 06/27/2016 :  07:58:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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 © 2008 Originlab Corporation Go To Top Of Page
Snitz Forums 2000