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
 Changing short name of book
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mrandersb

25 Posts

Posted - 06/21/2011 :  05:38:25 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have a script like this

range rPageData = [ID000000xData];
rPageData.Name$ = "test";

This should change the short name of the book ID000000xData to test, however it does not do anything. It works fine with

range rPageData = [ID000000xData];
rPageData.LongName$ = "test";

This changes the long name of the book, but how do i change the short name?

mrandersb

25 Posts

Posted - 06/21/2011 :  05:39:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
by the way, rPageData.Name$ seem to exist because

rPageData.LongName$ = rPageData.Name$ changes the lon name to ID000000xData as expected.
Go to Top of Page

Penn

China
644 Posts

Posted - 06/21/2011 :  06:28:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

When the book "ID000000xData" is active, the range you defined and the page object will the same refer to this book. You can also see, in wiki of the page object, that the page.name$ is read only. So, by using it, you can get, but cannot set the short name.

Penn
Go to Top of Page

mrandersb

25 Posts

Posted - 06/21/2011 :  5:08:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok, I see. Any other way I can change the short name then?
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 06/21/2011 :  7:30:27 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I am afraid you have to use older labtalk commands which does not have error checking,



win -r ID000000xData Test;//rename the window ID000000xData to Test




CP
Go to Top of Page

mrandersb

25 Posts

Posted - 06/22/2011 :  04:28:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks it works perfectly. The error message is not that important, because it is a very simple renaming script.
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