cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
dustincurry
Level I

Printing variables to display box/window

I have a script that calculates some slopes and offsets based on a large data set. 

Once the slopes and offsets are calculated I want to output them to a new display box or window. 

It has been a couple years since I have really done much scripting with JMP so I'm fairly rusty, so I'm sure the code below is far from correct.

How can I output the variables to some kind of pop out window?

My variables are Slope_1C, Offset_1C, Slope_2C, Offset_2C.

 

New Window ("Slopes and Offsets",
Text box("1C Slope = ", Slope_1C),
Text box("1C Offset =", Offset_1C),
Text box("2C Slope =", Slope_2C),
Text box("2C Offset =", Offset_2C),
);

 

Thanks!

1 REPLY 1
jthi
Super User

Re: Printing variables to display box/window

If your variables have numeric values, you will have to change them to characters with Char(). Then you could concatenate them, for example:

Text box("2C Slope =" || char(Slope_2C))

I would use Lineup Box in case like this:

Names Default To Here(1);

Slope_1C = 1;
Offset_1C = 2;
Slope_2C = 3;
Offset_2C = 4;

New Window("Slopes and Offsets",
	Lineup Box(N Col(2),
		Text Box("1C Slope = "),
		Text Box(char(Slope_1C)),
		Text Box("1C Offset = "),
		Text Box(char(Offset_1C)),
		Text Box("2C Slope = "),
		Text Box(char(Slope_2C)),
		Text Box("2C Offset = "),
		Text Box(char(Offset_2C)),
	)
);

jthi_0-1634750644235.png

 

-Jarmo

Recommended Articles