For the latest version of JMP Help, visit JMP.com/help.

Scripting Guide > Creating Projects > Close Tabs in Projects
Publication date: 09/28/2021

Close Tabs in Projects

Close a tab in a project by identifying the window with Get Window() and then closing it with Close Window.

project = New Project();
project << Run Script(
	dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
	dt << Run Script( "Bivariate" );
	dt << Run Script( "Distribution" );
);
 
Wait( 2 ); // for demonstration purposes
 

// returns a reference to the open "Big Class - Distribution" window

dist = Get Window( Project( project ), "Big Class - Distribution" ) ;
dist << Close Window();

To close all tabs in a project, use Get Window List << Close Window().

project = New Project();
project << Run Script(
	dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
	dt << Run Script( "Bivariate" );
	dt << Run Script( "Distribution" );
);
 
Wait( 2 ); // for demonstration purposes
 
Get Window List( Project( project ) ) << Close Window();
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).