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
 How to get a value from text label?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

aspirant

Russia
4 Posts

Posted - 06/06/2002 :  11:52:09 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have a label placed on a worksheet. How to get a value of this label to use it as a variable in a Labtalk script?

P.S.: By the way, if open a worksheet and try execute:

page -label

in Labtalk script window Origin7.0(SP1) crashes as well as Origin6.0 (Win2000).

Mike Buess

USA
3037 Posts

Posted - 06/06/2002 :  2:52:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you placed the text label on the worksheet with the Add Text command on the right-click menu you should be able to get its contents with

%A=text.text$;

In any case you can select the text label and then use Label Control on the Format menu to find out it's name and/or change it. Then use

%A=labelname.text$; // put its contents in the string variable A
labelname.text$=%A; // set its contents to the contents of %A

...What is page -label? Are you sure you are using the right command?

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 06/06/2002 14:54:12
Go to Top of Page

CStorey

Canada
137 Posts

Posted - 06/06/2002 :  5:00:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Page -label???

There's a page -l templateName command that:

Reads the specified template file and add all of its layers to the page in the active graph window.
I think you just used this command inappropriately to cause a crash. But maybe there should be some protection against this.


Craig Storey
Origin WebRing Member - http://g.webring.com/hub?ring=originwebring
Go to Top of Page

aspirant

Russia
4 Posts

Posted - 06/06/2002 :  5:36:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
%A=text.text$;
works just fine, thanks.

page -label is of course wrong to use for worksheet but it is a little disappointed to loose unsaved work, must be some sort of protection at least. I expected to see #Command Error!
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