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
 Workbook names

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
forecore Posted - 10/13/2017 : 03:58:38 AM
Hi,

why is it impossible to create a workbook with the same short name as another workbooks long name?

//create workbook with short name "SName" and long name "LName"
newbook name:=SName option:=lsname;
page.longname$="LName";

//create workbook with short and long name "LName"
newbook name:=LName option:=lsname chkname:=0;

The second workbook created will not have the short name "LName". Using
win -r %H "LName"
will prompt the user for another name as the short name "LName" is supposedly already taken. As I understand only short names of have to be unique.

Thanks,
forecore
3   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 10/15/2017 : 11:18:05 PM
Hi forecore,

As what I mentioned, Short Names must be unique within the project file while Long Name is optional. In general, when we add a new Short Name to this project, for example, creating a new book, renaming the Short Name of book, we need to check if this Short Name is already existing in the project firstly. However, when we add a new Long Name to this project, checking for the existence will be skipped. This is the reason why your first example works but the second one doesn’t.

This mechanism has existed for a long time. Also, we have added this issue to our improvement tracking database, ID: ORG-17193, to see if we can improve it and make it more logical.

Regards,
Yuki
OriginLab
forecore Posted - 10/13/2017 : 08:25:49 AM
Thanks for the answer. It is strange, that it is totally possible to change the long name to another window's short name, but not the other way around.

The result should be the same for the two examples:

//create workbook with short and long name "Name1"
newbook name:=Name1 option:=lsname;

//create workbook with short name "Name2" and long name "Name1"
newbook name:=Name2 option:=lsname;
page.longname$="Name1";
will work fine. However,

//create workbook with short name "Name2" and long name "Name1"
newbook name:=Name2 option:=lsname;
page.longname$="Name1";

//create workbook with short and long name "Name1"
newbook name:=Name1 option:=lsname;
will not. You would expect the same result for both. Either
(1) One workbook with both long and short name being "Name1" and one with short name "Name2" and long name "Name1".
or
(2) Some kind of error or unexpected Names like "Name3".
yuki_wu Posted - 10/13/2017 : 06:01:23 AM
Hi forecore,

The Short Names of Workbook must be a unique name within the project file. It should not be the same with the names of other windows, even their Long Names.

Regards,
Yuki
OriginLab

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