BookmarkSubscribe
Choose Language Hide Translation Bar
pauldeen
Community Trekker

Open an extra journal from script on mac (Windows: Main Menu("File:New:Journal") )

On the windows version of my script I use the command:

main menu("File:New:Journal") 

this opens up an extra journal and allows me to control what goes in each journal. I'm looking for the equivalent command for the Mac platform since one of my testers tells me the script doesn't run and this is the output I get:

Command is not recognized{1} in access or evaluation of 'Main Menu' , Main Menu( "File:New:Journal" )
0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Staff

Re: Open an extra journal from script on mac (Windows: Main Menu("File:New:Journal") )

FWIW (with JMP 13 on the Mac), this works:

main menu("File:New:New Journal") 

Also 'Help > Scripting Index' is your friend. It revals that you can do things like this:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sample = Distribution( Y( :height ) );
sampjourn = sample << Get Journal;
New Window( "Distribution of Height",
	Text Box(
		"Here is the result of the distribution platform for Height."
	),
	Journal Box( sampjourn )

 

5 REPLIES 5
ian_jmp
Staff

Re: Open an extra journal from script on mac (Windows: Main Menu("File:New:Journal") )

FWIW (with JMP 13 on the Mac), this works:

main menu("File:New:New Journal") 

Also 'Help > Scripting Index' is your friend. It revals that you can do things like this:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sample = Distribution( Y( :height ) );
sampjourn = sample << Get Journal;
New Window( "Distribution of Height",
	Text Box(
		"Here is the result of the distribution platform for Height."
	),
	Journal Box( sampjourn )

 

pauldeen
Community Trekker

Re: Open an extra journal from script on mac (Windows: Main Menu("File:New:Journal") )

Thanks, your first line solves my problem.

It would be nice if this worked but unfortunatly you don't seem to be able to get the journal for a data table:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sample = Distribution( Y( :height ) );
sampjourn = sample << Get Journal;
dtjourn = dt << Get Journal;
New Window( "Distribution of Height",
	Outline Box(
		"Here is the result of the distribution platform for Height.",
	v list box(Journal Box( sampjourn ),Journal Box( dtjourn ))
);

Any ideas how to solve that one?

0 Kudos
ian_jmp
Staff

Re: Open an extra journal from script on mac (Windows: Main Menu("File:New:Journal") )

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sample = Distribution( Y( :height ) );
sampjourn = sample << Get Journal;
New Window( "Distribution of Height",
	Outline Box( "Here is the result of the distribution platform for Height.",
		Data Table Box( dt ),
		Journal Box( sampjourn )
	)
);
0 Kudos
pauldeen
Community Trekker

Re: Open an extra journal from script on mac (Windows: Main Menu("File:New:Journal") )

Unfortunatly the data table box does not transfer value colors or color coding on prob values. I use these to highlight conclusions (see attached). My current solution is to push the data table into a fresh journal (hence the original problem statement), steal that journals' code and add that to a journalbox in my outlinebox hierarchy in the main journal but that doesn't work on Mac. Is there a way to make the journal box copy the colors from the table

Capture-3.PNG

0 Kudos

Re: Open an extra journal from script on mac (Windows: Main Menu("File:New:Journal") )

The last post in this thread had a request that colors in the data table be copied to the Journal. I'm a little late replying to this, but it looks like this was addressed in JMP 14. The script such as the one below is working on Mac.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
/* Set colors using Color or Mark by Column and select Copy to Column Property
*/
sample = Distribution( Y( :height ) );
sampjourn = sample << Get Journal;
dtjourn = (dt << Journal) << Get Journal;
New Window( "Distribution of Height",
Outline Box( "Here is the result of the distribution platform for Height.",
v list box( Journal Box( dtjourn ), Journal Box( sampjourn ) )
)
);

Please let us know if you still have a problem in this area.

0 Kudos