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
 Origin Forum
 multiple header files
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mbreit

3 Posts

Posted - 10/03/1998 :  1:30:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I would like to have multiple worksheets' headers to be ascociated with different text lables in different graph layers.

I can get it to work with one worksheet and one graph layer by using %Z=header.text$ in the script window of the worksheet and then putting %Z as the text in the lable on the graph layer(and enabling the Link to Variables in the Lable Control dialog window).

However, when I try to add another worksheet and graph layer, say by putting $Y=header.text$ in the script window of the second worksheet and %Y as the text in the lable of the second graph layer(and enabling the Link to Variables in the Lable control dialog window) it doesn't work.

It seems Z is the only variable I can assign the header.text to.

Does anyone know how I can get more than one header into different graph layers?

mbreit

3 Posts

Posted - 10/06/1998 :  2:52:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok, I'm still not able to get it to work. Here is what I'm doing:

In worksheet script box #1:
header1.text$=%Z

In worksheet script box #2:
header2.text$=%Z

In "header1" text label in graph layer 1:
%Z

In "header2" text label in graph layer 2:
%Z

First I import a file to worksheet #1 and the correct label gets put in header1 (and it also gets put in header2)

Then I import a file to worksheet #2 and the correct label gets put in header2, but header1 also gets changed.

I don't think I know what you mean by "make a one time assignment."

Do I have the right commands in the right places and what should I do different?

I really appretiate the help!

Matt

Go to Top of Page

greg

USA
1379 Posts

Posted - 10/06/1998 :  7:27:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you reverse the way you assign you should have no problems.

Currently you are using the 'Link to Variables' which allows you to put a variable in a text box and then tell Origin to display the variable value rather than its name. Unfortunately if this variable is changed or re-used at any time then the displayed text will change as well.

Instead, you should be creating multiple labels (for instance: header1 in layer1, header2 in layer2, etc.) and making a one-time assignment from the %Z string after each worksheet import that changes %Z.

In LabTalkTM:

header$(currentlayer).text$=%Z;

where currentlayer is a variable set to the layer your working with. The command translates to:

header1.text$=%Z for instance.
Go to Top of Page

mbreit

3 Posts

Posted - 10/07/1998 :  5:01:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, I got it!

Matt

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