cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

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