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
 file name on a graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

pb

Italy
8 Posts

Posted - 04/08/2002 :  09:20:08 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
What is the LabTalk command to type the filename on a graph or worksheet window?
Thanks

greg

USA
1378 Posts

Posted - 04/08/2002 :  11:05:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
label -p 45 2 -s -n project \v(%X%G.OPJ);

The "-n project" names the label so it can be updated or deleted from script.
The "-p 45 2" is one of a number of ways the label can be positioned. (See the LabTalk LABEL command for others.)
The "-s" option allows Origin string variables to be interpreted. (%X is a project path and %G is a project name.)
Since paths typically contain backslash characters ('\') and LabTalk uses that character as an escape sequence for formatting, the string - %X%G - is wrapped with a special escape sequence - \v( ) - to express the substituted strings 'verbatum' - ignoring all other '\' sequences.



Edited by - greg on 04/08/2002 11:07:08
Go to Top of Page

ChristianJ

Germany
22 Posts

Posted - 01/05/2016 :  11:00:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi
I'm sorry for reviving this old topic, but I can't figure out how to deal properly with the backslash... Is there an escape sequence for the backslash? Typing \\ doesn't work with the type command. (It shows two backslashs)

For example:
I have a Filepath: "C:\temp\01\myOriginProject\"
which looks like this, when I use the type command without options: "C: emp" (escaped \t and \0)
when I use type -v instead it looks good: "C:\temp\01\myOriginProject" (not escaped)

But my problem with the -v option is, that it is used for the whole string. What if I need some escape-sequences executed others not? Imagine the following string: "Origin Project is saved here:\nC:\temp\01\myOriginProject\" (Which could be used as log or something)
This string looks strange with and without the -v option.

Can you help me?

Regards
C
Go to Top of Page

Castiel

343 Posts

Posted - 01/06/2016 :  02:53:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by ChristianJ

Hi
I'm sorry for reviving this old topic, but I can't figure out how to deal properly with the backslash... Is there an escape sequence for the backslash? Typing \\ doesn't work with the type command. (It shows two backslashs)

For example:
I have a Filepath: "C:\temp\01\myOriginProject\"
which looks like this, when I use the type command without options: "C: emp" (escaped \t and \0)
when I use type -v instead it looks good: "C:\temp\01\myOriginProject" (not escaped)

But my problem with the -v option is, that it is used for the whole string. What if I need some escape-sequences executed others not? Imagine the following string: "Origin Project is saved here:\nC:\temp\01\myOriginProject\" (Which could be used as log or something)
This string looks strange with and without the -v option.

Can you help me?

Regards
C



LabTalk is weird. In your case, enter a new line instead of \n, like this:

\v(Here:
%X%G.OPG

To run such script, you have to select all these 2 lines before hitting ENTER. And why leaving out the closing parenthesis? LOL~

妾+   午旦  妹罕妾  妾伊    用仇  妾/     岫ㄞ
 妾京用 仍巨  件 侈   件戶' 甘岫平   /欠  白岫妹
   併             艮          岫  奈 白   岫
                              岫
Go to Top of Page

ChristianJ

Germany
22 Posts

Posted - 01/21/2016 :  04:35:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I'm not getting this to work. Here are my attempts (with output in red):

>>\v(Here:
%X%G.OPG
#Command Error!

>>ty \v(Here:
%X%G.OPG
\v(Here:
C: emp

>>ty -v(Here:
%X%G.OPG
C:\temp\01\myOriginProject\mOP.OPG

OK. This LabTalk thing is too weird for me. If I try to solve little problems, I'm forced to search for solutions over hours. I realized that I get things done quicker, when I use OriginC.
Anyway, thanks for your advice, Castiel!
Go to Top of Page

Castiel

343 Posts

Posted - 01/22/2016 :  08:13:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by ChristianJ

I'm not getting this to work. Here are my attempts (with output in red):

>>\v(Here:
%X%G.OPG
#Command Error!

>>ty \v(Here:
%X%G.OPG
\v(Here:
C: emp

>>ty -v(Here:
%X%G.OPG
C:\temp\01\myOriginProject\mOP.OPG

OK. This LabTalk thing is too weird for me. If I try to solve little problems, I'm forced to search for solutions over hours. I realized that I get things done quicker, when I use OriginC.
Anyway, thanks for your advice, Castiel!



Tried in command window? You should have tried the script window instead.

妾+   午旦  妹罕妾  妾伊    用仇  妾/     岫ㄞ
 妾京用 仍巨  件 侈   件戶' 甘岫平   /欠  白岫妹
   併             艮          岫  奈 白   岫
                              岫
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