cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
johanna_younous
Level III

losses of information in a graph box saved in journal

Hello, 

My english may not be clear I apologise in advance if it's the case.

I try to create a graph in a graph box that I want to save in a journal.

To create lines in my graph, I have to put coordintates in a variable because this may be changing depending on some parameters in my data.

Everything is running fine until I save the journal. But when I re-open this journal from an other jmp session or even if I just run "clear globals"  I loose everything. In fact , in the journal script, my variables keep their name and if I erase what is assign to my variable then the script of the journal will be bugging ( as it does not recognize  anymore my variable). 

I tried to put the code in an expression, to put it in a function, to use the "eval" or "eval(parse()" command and nothing id working so far which is driving me crazy. 

Does anyone had the problem or have a clue to fix it?

 

 

Here is a code that re-create the problem

 

 

path ="C:\";
Var1=[10 30 90]; 
Var2=[88 22 44] ;

obj=New Window( "Example", Graph Box( Line( Var1, Var2 ) ) );

obj<<journal;
jrn= Current Journal();
 
jrn<<Save Journal(path||"jrn_test.jrn");
jrn<< close window();
obj<<close window();

clear globals(); 

path ="C:\";

open(path||"jrn_test.jrn");

Thank you very much in advance !

 

ps : I'm using JMP14.1.0 (64bits)

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: losses of information in a graph box saved in journal

I'm using JMP16.2 so hopefully the issues are same. I get following error message Name Unresolved: Var1 in access or evaluation of 'Var1' , Var1/*###*/ which tells me that when the journal is re-opened the variables are no longer defined. To avoid this I would try one of the methods found fromInsert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute . These will allow you to evaluate the values to the graph box instead of just leaving it as Var1 and Var2. Below is an example using Eval(EvalExpr()).

 

Names Default To Here(1);

path = "$TEMP\";
Var1 = [10 30 90];
Var2 = [88 22 44];

Eval(
	EvalExpr(
		obj = New Window("Example", Graph Box(Line(Expr(Var1), Expr(Var2))));
	)
);

obj << journal;
jrn = Current Journal();
 
jrn << Save Journal(path || "jrn_test.jrn");
jrn << close window();
obj << close window();

wait(1);

Open(path || "jrn_test.jrn");

Non-evaluated:

jthi_1-1652194059172.png

 

 

Evaluated:

jthi_0-1652194040615.png

 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: losses of information in a graph box saved in journal

I'm using JMP16.2 so hopefully the issues are same. I get following error message Name Unresolved: Var1 in access or evaluation of 'Var1' , Var1/*###*/ which tells me that when the journal is re-opened the variables are no longer defined. To avoid this I would try one of the methods found fromInsert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute . These will allow you to evaluate the values to the graph box instead of just leaving it as Var1 and Var2. Below is an example using Eval(EvalExpr()).

 

Names Default To Here(1);

path = "$TEMP\";
Var1 = [10 30 90];
Var2 = [88 22 44];

Eval(
	EvalExpr(
		obj = New Window("Example", Graph Box(Line(Expr(Var1), Expr(Var2))));
	)
);

obj << journal;
jrn = Current Journal();
 
jrn << Save Journal(path || "jrn_test.jrn");
jrn << close window();
obj << close window();

wait(1);

Open(path || "jrn_test.jrn");

Non-evaluated:

jthi_1-1652194059172.png

 

 

Evaluated:

jthi_0-1652194040615.png

 

-Jarmo
johanna_younous
Level III

Re: losses of information in a graph box saved in journal

Thx !!!

It seems to work perfectly!