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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Read out workbook longname without activating

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 HyperlinkUpload FileInsert 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 [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Taron Posted - 03/31/2014 : 03:51:07 AM
Origin Ver. 8.6.0 b70
Operating System: Windows 7 x64

Hi,

I am looking for a way to read out the longname of a workbook without having to active it. Currently I have to activate it first and use page.name$ to read out the workbooks longname into a string.
This is not very convenient as it slows down my script considerably.

Is there any way of reading out the longname without having to activate a workbook?
5   L A T E S T    R E P L I E S    (Newest First)
lkb0221 Posted - 03/31/2014 : 11:31:28 AM
Hi,

Yes, the brackets indicates that it is optional. Sorry I did not make it clear in the first place.
For example:
//
window -a Book1; // Active Book1
page.longname$ = BK1; // Set page longname
window -a Book2; // Active Book2
Book1!page.longname$ = ; // Will return "BK1"
//

Zheng
OriginLab
Taron Posted - 03/31/2014 : 11:25:52 AM
Thanks a lot!
That's what I wanted.
bastianb Posted - 03/31/2014 : 11:24:21 AM
Hi,

the brackets are too much, they indicate that the including is optional

I guess this should work for you:
storevar$ = Book1!page.longname$;

best regards
Bastian
Taron Posted - 03/31/2014 : 11:02:53 AM
Thanks!
So if the short name of my workbook is e.g. Book1 and I am currently in Book2 I have to enter:

storevar$ = [Book1!]page.longname$;

to access the longname of Book1 and store it in my storevariable storevar$?

Edit: I just tried it with this syntax and it doesn't work (with or without the "!"). So what would be the actual syntax in my case?
lkb0221 Posted - 03/31/2014 : 09:31:10 AM
Hi,

The standard syntax of page properties is actually:

[winName!]page.property =

When [winName!] is not specified, the active window is affected.

Zheng
OriginLab

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