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
 Title of Graph should be graph long name
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Martur

Sweden
4 Posts

Posted - 03/07/2011 :  4:45:05 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi.

I'd like to make a template in which the graph title is set to the graphs long name. I found that if I set the title to %h it would be named after the short name but I cannot find out how to use the long name.

Martin

P.S.: Origin 8.1

easwar

USA
1964 Posts

Posted - 03/07/2011 :  4:59:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Martin,

Set the label text to be:
%(page.longname$)
and of course make sure to check the "Link to variables (%,$)" check box in the Programming Control dialog for that label.

Would need to refresh page to update label if name is changed later.

Easwar
OriginLab
Go to Top of Page

Martur

Sweden
4 Posts

Posted - 03/07/2011 :  5:02:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
omg, I tried that an hour ago and it did not work but now it does... Thanx.
Go to Top of Page

ChristianJ

Germany
22 Posts

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

is this kind of substitution (page.longname$) documented online? Could anyone give me the link, please? I was only aware of the short version so far (@LM, ...).

And another little question: Is it possible to insert linebreaks automatically into labels, if the graph-windows longname is too long?
Go to Top of Page

snowli

USA
1379 Posts

Posted - 08/29/2016 :  12:16:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi ChristianJ,

In latest Origin 2016, user can specify what to show as Graph short name as long name instead of the fixed Graph1, Graph2, ... when creating new graphs from template.

You can watch this video for details
http://originlab.com/Index.aspx?go=Support/VideoTutorials&pid=3190

We don't support line break in long name. But you can store some multi-line text as comments of graph window but they will not show in window title.

You can look at http://www.originlab.com/doc/LabTalk/ref/Text-Label-Options#Complete_List_of_.40Options

to see many @ notations


Thanks, Snow
Go to Top of Page

ChristianJ

Germany
22 Posts

Posted - 08/30/2016 :  02:40:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Snow,

thanks for your reply. But it doesn't answers my question exactly.

I made a graphtemplate with a text label at the top, which is used as graph title. This title is gotten from the graph-windows longname with %(page.longname$). Some longnames are too long to fit in one line (of the label) and it would be nice to break the lines in this label automatically. But maybe there is a much simpler way to achieve what I want to achieve

The list of @text-label options is definetly worth bookmarking it but it doesn't seems to make it possible to get the graph-window longname into a textlabel.
I've found the page object reference. As I know from this thread, I can use the labtalk variables in the label substitution. But as I mentioned before, I wasn't aware of this possibility.
Go to Top of Page

snowli

USA
1379 Posts

Posted - 08/30/2016 :  09:52:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Christian,

I am not sure if long longname can be put into multi-lines automatically.

How about you manually give the multi-line text to page comments and then add comments as label. It will show the comments as specified.

page.comments$="firstline%(crlf)secondline";
label -p 50 0 -s %(page.comments$)

Thanks, Snow
Go to Top of Page

ChristianJ

Germany
22 Posts

Posted - 08/31/2016 :  09:37:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I'll give the multilined pagecomments a try. It was just nice and neat to name the graphs windowtitle and automatically the graphs titlelabel.

Thanks for your efforts, Snow!
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