cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
MFVIT
Level IV

Extracting JSL code from a journal

Hello!

 

Does anyone know how to ‘extract’ the JSL code of a given journal? It would be very useful to learn how to write JSL codes that generate reports/journals.

For example suppose you create a journal by adding text, file reference etc.. You want to save the script that would generate that journal. Is that possible?

Many thanks,

 

Marcello.

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: Extracting the JSL code of a journal

Journals created from JMP platforms do have a copy of the script would reproduce the platform if the data table was available.  But journals created from your own scripts (like the earlier example) do not contain a copy of the script that made the journal.  But a journal with buttons that run scripts does contain the button scripts.

The original purpose of a journal was to keep a record of the results of running a platform.  Mostly the journal is a set of instructions (not JSL) for rebuilding the appearance of the platform without re-running the platform. 

But because the platform's red-triangle menu is saved to the journal, the script for re-running the platform is in the journal.

What do you want to do?  I think there is a better approach than "undoing" a journal, but I'm unclear on the goal.

Craige

View solution in original post

5 REPLIES 5
Craige_Hales
Super User

Re: Extracting the JSL code of a journal

Sounds like you want something like this:


x = Current Journal(); // makes a new journal if none open


x << append( // add to the end of the journal


   Outline Box( "example",


      V List Box( // the outline holds a vertical list of two items...


         Text Box( "hello" ),


         Button Box( "there", Print( "run some JSL" ) )


) ) );


JMP has both .JSL and .JRN files and the contents of them looks similar, but only the .JSL files really have executable script language.  The .JRN files have a description of what the JMP output looked like when the journal was created by journalling a platform's output.  Except, as you've noticed, journals sometimes have buttons that have scripts that run when the button is pressed. 

Craige
MFVIT
Level IV

Re: Extracting the JSL code of a journal

Thank you for you quick response. Suppose I have the journal corresponding to the jsl reported below and I save it as a jrn file. Can I get the jsl code starting from the jrn file? From an open report I can generate the jsl code that produces that report so I was wondering if that is possible also for an open journal. I think my view is too simplistic!! I am starting up with jsl.

Many thanks.

Da: Craige@JMP

Inviato: mercoledì 12 agosto 2015 19.02

A: Marcello Fidaleo

Oggetto: Re: - Extracting the JSL code of a journal

<https://community.jmp.com/?utm_source=JIVE&utm_medium=email&utm_campaign=System%20Email%20Tracking> JMP User Community

Extracting the JSL code of a journal

reply from Craige@JMP <https://community.jmp.com/people/Craige%40JMP?et=watches.email.thread> in Discussions - View the full discussion <https://community.jmp.com/message/222625?et=watches.email.thread#222625>

Craige_Hales
Super User

Re: Extracting the JSL code of a journal

Journals created from JMP platforms do have a copy of the script would reproduce the platform if the data table was available.  But journals created from your own scripts (like the earlier example) do not contain a copy of the script that made the journal.  But a journal with buttons that run scripts does contain the button scripts.

The original purpose of a journal was to keep a record of the results of running a platform.  Mostly the journal is a set of instructions (not JSL) for rebuilding the appearance of the platform without re-running the platform. 

But because the platform's red-triangle menu is saved to the journal, the script for re-running the platform is in the journal.

What do you want to do?  I think there is a better approach than "undoing" a journal, but I'm unclear on the goal.

Craige
MFVIT
Level IV

Re: Extracting the JSL code of a journal

Hello Craig,

Thank you very much for your clear explanation of how journals work in JMP. I am creating an add-in and I wanted to learn how to write the jsl code that makes the text appear on two columns. From your response to my other question I solved the problem.

Marcello.

Da: Craige@JMP

Inviato: mercoledì 12 agosto 2015 20.50

A: Marcello Fidaleo

Oggetto: Re: - Extracting the JSL code of a journal

<https://community.jmp.com/?utm_source=JIVE&utm_medium=email&utm_campaign=System%20Email%20Tracking> JMP User Community

Extracting the JSL code of a journal

reply from Craige@JMP <https://community.jmp.com/people/Craige%40JMP?et=watches.email.thread> in Discussions - View the full discussion <https://community.jmp.com/message/222645?et=watches.email.thread#222645>

Craige_Hales
Super User

Re: Extracting the JSL code of a journal

Or maybe you don't want a journal at all.  You can also build complicated displays in a new window.

From the scripting index, this display only has one item:


g = Graph Box(


  Frame Size( 300, 300 ),


  Marker( Marker State( 3 ), [11 44 77], [75 25 50] );


  Pen Color( "Blue" );


  Line( [10 30 70], [88 22 44] );


);


New Window( "My Window's Title", g );


Craige