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
markschahl
Level V

How to refer to data tables within a project?

Hi! I have a jmpprj file with multiple tables in it. To make it easier for users, I've created a journal within the project with script buttons to launch specific analyses.

 

  1. What is the best way to point to the dt in the script below? Open()? Other? If Open(), what is the correct file path (I am planning on sending this jmpprj file to many people and need the script to run "anywhere")
  2. How to ensure the output stays within the project?
  3. Any other tips on scripting within a project?

Thanks in advance, o-talented-JSL-scripters!

 

Names Default to Here (1);
dt = // how to refer to a given table in this project?
dt << Graph Builder(
	Size( 2165, 1020 ),
	Show Control Panel( 0 ),
	Fit to Window,
	Variables( X( :Platform ), Y( :Equipment.Simplified ) ),
	Elements( Points( X, Y, Legend( 5 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Equipment.Simplified",
			ScaleBox,
			{Label Row( Show Major Grid( 1 ) )}
		),
		Dispatch( {}, "graph title", TextEditBox, {Set Text( "Blah Blah Blah" )} )
	)
);
2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: How to refer to data tables within a project?

Have you read scripting guide part of projects, https://www.jmp.com/support/help/en/18.0/#page/jmp/creating-projects.shtml# ? Are you storing the data tables to the project (embedded) or are they just "links" (referenced)?

-Jarmo

View solution in original post

jthi
Super User

Re: How to refer to data tables within a project?

There is but it is only available inside a project, $PROJECT

jthi_0-1725429421510.png

Projects have their own a bit weird file "path: "jmpprj://contents/"

jthi_1-1725429527215.png

I think you can also use Get Default Directory() IF you have saved the script which is running that function inside the project.

 

Usually I try to script projects just like I would JMP normally (but in reality I try to JMP projects due to few issues they have), but depending where you are writing the JSL, inside or outside of project, it is a bit different.

-Jarmo

View solution in original post

5 REPLIES 5
jthi
Super User

Re: How to refer to data tables within a project?

Have you read scripting guide part of projects, https://www.jmp.com/support/help/en/18.0/#page/jmp/creating-projects.shtml# ? Are you storing the data tables to the project (embedded) or are they just "links" (referenced)?

-Jarmo
markschahl
Level V

Re: How to refer to data tables within a project?

Jarmo:

Thanks for link. I thought that I had exhaustively searched the help...

The data tables are embedded in the project itself. There doesn't seem to be a path variable for "Current Project":
https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/path-variables.shtml#ww361809

jthi
Super User

Re: How to refer to data tables within a project?

There is but it is only available inside a project, $PROJECT

jthi_0-1725429421510.png

Projects have their own a bit weird file "path: "jmpprj://contents/"

jthi_1-1725429527215.png

I think you can also use Get Default Directory() IF you have saved the script which is running that function inside the project.

 

Usually I try to script projects just like I would JMP normally (but in reality I try to JMP projects due to few issues they have), but depending where you are writing the JSL, inside or outside of project, it is a bit different.

-Jarmo
markschahl
Level V

Re: How to refer to data tables within a project?

Jarmo: thanks, it was just what i needed!

markschahl
Level V

Re: How to refer to data tables within a project?

JMPProject File Path.png

 

Well, accidentally discovered this while hovering over the project contents file list: right click on the file to copy the path...