cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

How to use JSL to copy and paste frame settings

Hello,

Is there a way to capture the frame settings within JSL to say a list or other variable instead of sending it to the clipboard?

thisBiv = Bivariate(.....);

report_Biv = thisBiv << Report;

????? = report_Biv << Copy Frame Settings;

If not, how do I access the results of the clipboard from within JSL so that I can then paste the frame settings to another report?

Thanks,

Dan

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to use JSL to copy and paste frame settings

Dan,

Each of the object within your display can be referenced to get the components that you want.  If you right click on the Gray triangle, that is left of the outline box title("Bivariate fit.......") and select Edit==>Show Tree Structure you will see all of the objects in your display.  Any of the objects that you want the current settings for, you can query, such as

   minimum axis = report(oo)[axis box(1)]<<get min

The assumption in the above is that you started you bivariate request with

  oo = Bivariate(.........)

You can also get all of the settings for the entire display or for any subcomponent of the display by asking for the script to be returned that will regenerate the display:

  report(oo)[axis box(1)]<<get script

or

  oo<<get script

contained in that script will be all of the modifications your user has set. 

The script results is the closest to returning all of the parameters as you listed above.  However, if you have a list of the items that you are going to limit the users to, then getting the individual parameters is the easiest.

 

I have used both methods.  Parsing through a returned script is a bit more complex, however, it does have the advantage, that once you have the script, and you make the modifications you need for the next step(if any), you can just re-execute the captured script, and the chart/graph etc. will be replayed just as the user had modified it.

Jim

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: How to use JSL to copy and paste frame settings

The report object created by a JMP platform can be appended to any other JMP display object.  My interpretation of what you are asking is that what you want to do is to combine the outputs from multiple reports together.  Using your pseudo code from above, you would do:

thisBiv = Bivariate(.....);

report_Biv=thisBiv<<Report;

another=OneWay(......);

report(another)<<append(report_Biv);

Does this answer the question?

Additionally, each of the output components in the report can be referenced, so a sub component from the report_Biv can be prepended or appended to a sub component within the report output from "another".

Jim

Re: How to use JSL to copy and paste frame settings

Hello Jim,

Thank you for your response.  It's not quite what I'm trying to do.  I'm creating a GUI for exploring data that our engineers can use.  Please see the example below:

10780_pastedImage_0.png

The red boxes above are descriptives of what the GUI does.  The large box in the bottom explains what I would like to do.

I've pasted the clipboard to the JMP log and can see what is captured when using something like 'FrameBox(1) << Copy Frame Settings' is executed within a JMP script.  It produces something similar to the following:

/*JMPType:FrameScript*/{Frame Size(800, 250), Left(1), Right(1), Top(1), Bottom(1), Set Background Color(2), Marker Size(-1), Marker Drawing Mode("Fast"), Line Width Scale(1), Transparency(1)}

How do I capture this within a JMP script that does not require manual intervention (e.g. copy and paste) from the users of the platform that I'm creating?

I tried 'X = FrameBox(1) << Copy Frame Settings', but 'X' is missing or empty.  Also I couldn't find a 'Paste Frame Settings' type command such that I could then use 'FrameBox(1) << Paste Frame Settings (X)' after the graph is redrawn and I want to preserve the previous graph's frame settings to be used for this new graph.  The same goes for the X and Y Axes and the Legend(s).

Thanks!

txnelson
Super User

Re: How to use JSL to copy and paste frame settings

Dan,

Each of the object within your display can be referenced to get the components that you want.  If you right click on the Gray triangle, that is left of the outline box title("Bivariate fit.......") and select Edit==>Show Tree Structure you will see all of the objects in your display.  Any of the objects that you want the current settings for, you can query, such as

   minimum axis = report(oo)[axis box(1)]<<get min

The assumption in the above is that you started you bivariate request with

  oo = Bivariate(.........)

You can also get all of the settings for the entire display or for any subcomponent of the display by asking for the script to be returned that will regenerate the display:

  report(oo)[axis box(1)]<<get script

or

  oo<<get script

contained in that script will be all of the modifications your user has set. 

The script results is the closest to returning all of the parameters as you listed above.  However, if you have a list of the items that you are going to limit the users to, then getting the individual parameters is the easiest.

 

I have used both methods.  Parsing through a returned script is a bit more complex, however, it does have the advantage, that once you have the script, and you make the modifications you need for the next step(if any), you can just re-execute the captured script, and the chart/graph etc. will be replayed just as the user had modified it.

Jim

Re: How to use JSL to copy and paste frame settings

Hi Jim,

Awesome, I'll give this a try!  I especially like the '<<get script' option as I can then port that into a holder expression then easily substitute the bits and pieces as necessary.  Thanks for your help.  I'll update this as soon as I get a chance and let you know if it worked for me.

Dan

Re: How to use JSL to copy and paste frame settings

Hi Jim,

Works like a charm!  Thanks again for your help.

Dan