cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Pro extension simulates Bayesian Optimization runs. Prediction formulas stand in for experimental results. Run simulations and compare results. Download and use the extension.

Discussions

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

Saving a new project using a variable name created within the project

Hello,

 

I've put together a script that starts by creating a project. After doing all sorts of things within the project, I get a variable name that want to  use to name/save the project.

 

I've tried using a global namespace to transfer the variable from inside the project to no avail.

 

Any suggestion would be very appreciated

Names Default To Here( 1 );
Clear Log();
project = New Project();

project << run script(
	dt = New Table( "test table for project", add rows( 1 ) );
	dt << save( "$DOCUMENTS/test delete.jmp" );
	if(isnamespace("trans")==0, trans = new namespace("trans"));
	trans:pjname = "blogus project.jmpprj";
);
name=trans:pjname;
show(name);
project << Save As( "$DOCUMENTS/" || name );
1 ACCEPTED SOLUTION

Accepted Solutions
Sburel
Level IV

Re: Saving a new project using a variable name created within the project

Found the answer to my own question.

 

 

Anyway, using 'this project()' does the trick. See script below

Names Default To Here( 1 );
Clear Log();
project = New Project();

project << run script(
	dt = New Table( "test table for project", add rows( 1 ) );
	dt << save( "$DOCUMENTS/test delete.jmp" );
	pjname = "blogus project.jmpprj";
	
	this project() << Save As( "$DOCUMENTS/" || pjname );
);

View solution in original post

1 REPLY 1
Sburel
Level IV

Re: Saving a new project using a variable name created within the project

Found the answer to my own question.

 

 

Anyway, using 'this project()' does the trick. See script below

Names Default To Here( 1 );
Clear Log();
project = New Project();

project << run script(
	dt = New Table( "test table for project", add rows( 1 ) );
	dt << save( "$DOCUMENTS/test delete.jmp" );
	pjname = "blogus project.jmpprj";
	
	this project() << Save As( "$DOCUMENTS/" || pjname );
);

Recommended Articles