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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Workbook names
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

forecore

2 Posts

Posted - 10/13/2017 :  03:58:38 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

yuki_wu

896 Posts

Posted - 10/13/2017 :  06:01:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

forecore

2 Posts

Posted - 10/13/2017 :  08:25:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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".

Edited by - forecore on 10/13/2017 08:53:01 AM
Go to Top of Page

yuki_wu

896 Posts

Posted - 10/15/2017 :  11:18:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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 © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000