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
 String user.variables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

BBE

Germany
2 Posts

Posted - 12/01/2014 :  09:30:59 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver.8G.0.63.988 SR6 v8.0988
Operating System: Win 7 SP1 64Bit

Hello everyone,

I'm pretty new in LabTalk and trying to write a script, which imports my data in a loop. Additionally it should set some Parameteres in the Graph, like colors and axis labels etc.

It is nearly done but I'm struggeling to get my hand on the predefined user variables. I tryed several different ways related on other posts in this forum. None of them succeeded.

Here is a part of the loop:


impFile file$ filter$;

//create Plot
plotxy iy:=(1,2) plot:=200;
themeApply2g theme:="MessImport" option:=project;
rescale;
label -r legend;

//Set Color
ty %(page.info.USER.VARIABLES.CH$);

if(channel$ = "CH1")
{
set %C -cl color(red);
}

Running the script gives the following output:

>>MyScript
%heme:="MessImport" option:=project
%heme:="MessImport" option:=project
%heme:="MessImport" option:=project
%heme:="MessImport" option:=project
%heme:="MessImport" option:=project
%heme:="MessImport" option:=project

Have anyone ever received a similar problem and could help me with it?

BBE

BBE

Germany
2 Posts

Posted - 01/05/2015 :  09:50:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I solved the problem.

For anyone who receives a similar problem:

The problem was the command themeApply2g.
In some way it deletes all the workspace variables ( or creates a new ws?).

If you access the page.info.user.variables before executing the command, you won't get any problems.

A happy new year!

BBE

Edited by - BBE on 01/05/2015 09:50:52 AM
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