cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

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