Author |
Topic |
|
Martur
Sweden
4 Posts |
Posted - 03/07/2011 : 4:45:05 PM
|
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
|
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 |
|
|
Martur
Sweden
4 Posts |
Posted - 03/07/2011 : 5:02:50 PM
|
omg, I tried that an hour ago and it did not work but now it does... Thanx. |
|
|
ChristianJ
Germany
22 Posts |
Posted - 08/29/2016 : 08:06:06 AM
|
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? |
|
|
snowli
USA
1391 Posts |
|
ChristianJ
Germany
22 Posts |
Posted - 08/30/2016 : 02:40:42 AM
|
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.
|
|
|
snowli
USA
1391 Posts |
Posted - 08/30/2016 : 09:52:52 AM
|
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 |
|
|
ChristianJ
Germany
22 Posts |
Posted - 08/31/2016 : 09:37:18 AM
|
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! |
|
|
|
Topic |
|