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
ckronig
Level III

Scripting for project layout

I have a script that generates 5 windows, and want to use the script to organise the output into a project format, and arrange the layout.

I would like the window list on the right. On the left, I would like two rows :

top row, I want two graphs side by side.

bottom row, I want three tables displayed in tabs.

I have come up with the below script, but it doesn't do what I want. Currently all 5 get displayed in a single row on five different tabs, with the windows list on the right.

Can someone point me in the right direction?

	Project = new project();
	Move to Project( destination( Project ), windows( {"Table1" ,"Table2" , "Table3", "Graph1", "Graph2"} ));
	Project << Set Layout(
	H Splitter Box(
		<<Set Sizes( {0.85, 0.15} ),			
		V Splitter Box(
			<<Set Sizes( {0.3, 0.7} ),
				H Splitter Box(
				<<Set Sizes( {0.5, 0.5} ),
			Tab Page Box( Window ID( "graph1" ) ),
			Tab Page Box( Window ID( "graph2" ) )
			),
			Tab Box(
			Tab Page Box( Window ID( "Table1" ) ),
			Tab Page Box( Window ID( "Table2" ) ),
			Tab Page Box( Window ID( "Table3" ) )
			),			

			),
			Tab Page Box(
				Title( "Window List" ),
				Window ID( "Windows" )
			),
		)  
	,
	),
13 REPLIES 13
chris_dennis
Level III

Re: Scripting for project layout

JMP 16 makes an improvement for the project platform by incorporating the files into the project file for saving and transferring. This is a nice improvement. My JMP 15 script to move files from a report into a project file still works in 16 but I would like to update to use the new features of JMP16. I am not sure what the new script structure would look like for this case. Any suggestions? Attached is what my script looks like now (not run able since all files based on my PC and data wrangling done by earlier part of script.

Re: Scripting for project layout

The project layout code should be (more or less) the same as before. The difference in JMP 16 is, when you go to save your content you can save it inside the project file if you choose. You do this automatically from a script, if you want, though I'd need to know a bit more about your project to recommend a specific method.

chris_dennis
Level III

Re: Scripting for project layout

The main body of the script generates 3 data files and links them together.  The way it is written now files are saved to C drive Temp folder and then moved into project.  I would like to add a contents section and add these three files into it with the script.  I think then I would update the analysis that is done to open the files in the project and make process capability graphs.  

Re: Scripting for project layout

Simplest possible example of creating a project, creating a data table, and saving that table to the project contents:

 

new Project(
	Run Script(
		dt = New Table( "My Table",
			Add Rows( 3 ),
			New Column( "Column 1",
				Set Values( [1, 2, 3] )
			)
		);
		
		dt << Save As("$PROJECT/my table.jmp");
	);
);

The path variable $PROJECT maps to the Project Contents of the current project (and as such is only usable inside a project). It would be perfectly fine to create the tables outside the project and then move them in, though if that isn't necessary for some external reason it's generally more efficient to create everything directly in the project the first time.