cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Anja_W
Level III

Add Outline Boxes to Window with variables

Hello,

I try to add several Outline Boxes to a window with parameters which are stored in lists. I use a For-Loop to append the boxes. For the title this works just fine. However, if I draw lines it does not work. Below is a minimal example which I would like to get to work.

I'm thankful for any idea what I should change and what I'm doing wrong.

Best,

Anja

 

::lineList = {10, 20, 30};
::titleList = {"Title 1", "Title 2", "Title 3"};
w = New Window("My Test Window", myBox = Outline Box("My Test"));
For(i = 1, i <= 3, i++,
	myBox << Append(Outline Box(titleList[i], Graph Box(H Line(lineList[i]))))

);



1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Add Outline Boxes to Window with variables

You can check how your Graph Box looks like by opening Customize menu

jthi_0-1675416052633.png

You can see that the value isn't there but rather variablename. You can for example use Eval(EvalExpr()) to avoid that issue

Names Default To Here(1);

lineList = {10, 20, 30};
titleList = {"Title 1", "Title 2", "Title 3"};
w = New Window("My Test Window", myBox = Outline Box("My Test"));
For(i = 1, i <= 3, i++,
	Eval(EvalExpr(
		myBox << Append(
			Outline Box(titleList[i], Graph Box(
				H Line(Expr(lineList[i]))
				)
			)
		)
	))
);

 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Add Outline Boxes to Window with variables

You can check how your Graph Box looks like by opening Customize menu

jthi_0-1675416052633.png

You can see that the value isn't there but rather variablename. You can for example use Eval(EvalExpr()) to avoid that issue

Names Default To Here(1);

lineList = {10, 20, 30};
titleList = {"Title 1", "Title 2", "Title 3"};
w = New Window("My Test Window", myBox = Outline Box("My Test"));
For(i = 1, i <= 3, i++,
	Eval(EvalExpr(
		myBox << Append(
			Outline Box(titleList[i], Graph Box(
				H Line(Expr(lineList[i]))
				)
			)
		)
	))
);

 

-Jarmo
Anja_W
Level III

Re: Add Outline Boxes to Window with variables

Thank you very much! Now it works just fine as I would like it.