Subscribe Bookmark RSS Feed

Question on control chart builder (specifically) and JMP formats in general

Swalo66

Community Trekker

Joined:

Apr 28, 2015

In control chart builder I would like to assign a specific number of decimal places in the Limit Summaries report.  Other than doing them individually, and changing the column number format, is there somewhere in the prefeerences (havent found anything myself) that this can be done so each time I start JMP it is set??

1 REPLY
ian_jmp

Staff

Joined:

Jun 23, 2011

I don't believe there is a preference, but you could use a script. The one below could be MUCH improved but might get things started; If needed, you could put it on a menu or button with a shortcut key.

Names Default To Here( 1 );
// Open a table and use Control Chart Builder to give us something to work with
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
cc = dt << Control Chart Builder( Show Capability( 0 ), Variables( Y( :height ) ) );

// Start here:
// See which windows are currently open in the session
winTitles = {};
For( w = 1, w <= N Items( Window() ), w++,
	Insert Into( winTitles, Window( w ) << getWindowTitle )
);

// Build a simple UI
myWin = 
NewWindow(
	"Open Windows",
	Panel Box( "Select a Window",
		lb = List Box( winTitles, MaxSelected( 1 ), <<SetWidth(300) ),
		Lineup Box( N Col( 2 ), Text Box( "Decimal Places:" ), neb = Number Edit Box( 2 ) ),
		Button Box( "OK", OKscript )
	)
);

// (Try to) update formats
OKscript =
Expr(
myWin << closeWindow;
selected = lb << getSelected;
if(NItems(selected) == 1,
	dp = neb << get;
	winRep = Window(selected[1]);
	Try(winRep[Number Col Box( 1 )] << Set Format( "Fixed Dec", 8, dp ));
	Try(winRep[Number Col Box( 2 )] << Set Format( "Fixed Dec", 8, dp ));
	Try(winRep[Number Col Box( 3 )] << Set Format( "Fixed Dec", 8, dp ));
	);
);