cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

JMP Scripting - Presentation/Journal

Hello JMP Team,

 

I need some help outputting my journal to a presentation.

The thing is, I want the presentation to use the specific pptx theme.

> 'jour << Save Presentation("' + tech_epi + "\\" + tech_epi + '.pptx", Template("C:\\Code\\Scripts\\PCM CPK Automation\\TrendChart-template.pptx"));\n'

 

Currently, inside my template.pptx, it only has 1 slide inside it. A empty title slide. But the title slide is of the desired pptx theme.

When the script below runs, it puts each Oneway plot on a new title slide. I want it to create a new Content slide and put the Oneway plots in the content slides.

 

How might I go about this?

 

I checked the Scripting Index but had some trouble understanding it.

 

AdditiveLamb108_0-1745354654010.png

 

 

 

jsl_code = (
                    'jmp_dt = Open("' + file_path + '");\n'
                    'column = Column(jmp_dt, "' + oracle_param + '");\n'
                    'column << Set Name("' + param + '");\n'
                    'obj = jmp_dt << Oneway(\n'
                    '    Y(:' + param + '),\n'
                    '    X(:LOT),\n'
                    '    Points(),\n'
                    '    Box Plots(1),\n'
                    '    Mean Diamonds(0),\n'
                    '    X Axis proportional(0),\n'
                    '    Grand Mean(0),\n'
                    '    SendToReport(\n'
                    '        Empty(),\n'
                    '        Dispatch({}, "1", ScaleBox, \n'
                    '            {Scale(Linear), Format(Best), Min(' + str(minY_plot) + '), Max(' + str(maxY_plot) + '), Inc(' + str(incr) + '),\n'
                    '            Add Ref Line(' + str(target) + ', Solid, Green),\n'
                    '            Add Ref Line(' + str(SH) + ', Solid, Red),\n'
                    '            Add Ref Line(' + str(SL) + ', Solid, Red),\n'
                    '            Add Ref Line(' + str(CH) + ', Dashed, Yellow),\n'
                    '            Add Ref Line(' + str(CL) + ', Dashed, Yellow)}\n'
                    '        ),\n'
                    '        Dispatch({}, "Oneway Plot", FrameBox, \n'
                    '            {Frame Size(1100, 400),\n'
                    '            Add Graphics Script(\n'
                    '                2,\n'
                    '                Description("Script"),\n'
                    '                Text Color("red");\n'
                    '                Text({0.1, ' + str(SL) + '}, "LSL");\n'
                    '            ), Add Graphics Script(\n'
                    '                3,\n'
                    '                Description("Script"),\n'
                    '                Text Color("red");\n'
                    '                Text({0.1, ' + str(SH) + '}, "USL");\n'
                    '            ), Add Graphics Script(\n'
                    '                4,\n'
                    '                Description("Script"),\n'
                    '                Text Color("yellow");\n'
                    '                Text({0.1, ' + str(CL) + '}, "LCL");\n'
                    '            ), Add Graphics Script(\n'
                    '                5,\n'
                    '                Description("Script"),\n'
                    '                Text Color("yellow");\n'
                    '                Text({0.1, ' + str(CH) + '}, "UCL");\n'
                    '            ), Add Graphics Script(\n'
                    '                7,\n'
                    '                Description("Script"),\n'
                    '                Text Color("green");\n'
                    '                Text({0.1, ' + str(target) + '}, "TGT");\n'
                    '            ),\n'
					'            Marker Size(3)\n'
					'			}\n'
                    '        )\n'
                    '    )\n'
                    ');\n'
                    'obj << Save Script to Data Table ( "Oneway", <<Replace ( 0 ), <<Prompt( 0 ));\n'
                    'obj << Journal;\n'
                    'jour = Current Journal();'
                    'jour << Save Presentation("' + tech_epi + "\\" + tech_epi + '.pptx", Template("C:\\Code\\Scripts\\PCM CPK Automation\\TrendChart-template.pptx"));\n'
                    'jmp_dt << Save("' + tech_epi + "\\" + param + '.jmp");\n'
                    'Close (jmp_dt, "NoSave");\n'
                )
6 REPLIES 6

Re: JMP Scripting - Presentation/Journal

Hi @AdditiveLamb108 ,

 

It doesn't look like JSL/JMP is capable of controlling Powerpoint to tell it to create the new slides as content slides - however I've just had a try with creating a template where the first slide is set as 'Content' instead of title and this creates the slides in content layout, which you could then add your title slide to?

 

Here is another community article with some different approaches to Powerpoint exporting too.

 

Thanks,

Ben

 

 

“All models are wrong, but some are useful”

Re: JMP Scripting - Presentation/Journal

Hi Ben,

 

I took a look at some of the existing articles.

Looks like most of the discussions suggest:

1) Going via Excel to create Powerpoint

2) Going via Powerpoint Macro (VBA)

3) Using Control Chart() in JSL

 

I really don't want to use Excel or Powerpoint to generate my powerpoint slides.

I want to run a single JMP Script that will generate my powerpoint slides for me.

 

I'm not familiar with Control Chart in JSL, but if that is something that can work for me; i'd be open to trying it.

 

@Ben_BarrIngh , is it possible for you to share your code where you said you were able to create a powerpoint using the "Content" slide. I have not been able to get this to work for the life of me.

 

Thanks,

Nathan

Re: JMP Scripting - Presentation/Journal

Hi @AdditiveLamb108 ,

 

I created the template by creating one slide on PPT, right clicking the layout and selecting 'Title and Content' - since this is the first (and only slide) when JMP selects the template it is forced into the Title and Content format (or any other format you choose). I don't see any reference to "Slide Layout()"  that @EmilyMark mentioned in the JSL Scripting Index and couldn't get that to work either so I don't know if they can clarify further. 

 

I would suggest you get over to the Wish List section and put a request in for additional functionalities to help. I can see on this Wish that development have already said they're exploring ways to improve JMP export to powerpoint. I know it doesn't help at the moment but hopefully some improvements will come that can help.

 

Hope this helps,

 

Thanks,

Ben

“All models are wrong, but some are useful”
EmilyMark
Level I

Re: JMP Scripting - Presentation/Journal

You can customize your PowerPoint template to contain a content slide layout in order to avoid having to use title slides for every single one of your plots and instead use Slide Layout("Content") in your Save Presentation() call. Unfortunately, JMP defaults to title slides unless specified via layout.

Re: JMP Scripting - Presentation/Journal

Hello Emily.

This is my template. Note it only has 1 slide.

Note, the name of the slide is "Title and Content".

AdditiveLamb108_0-1745449056317.png

 

'jour << Save Presentation("' + tech_epi + "\\" + tech_epi + '.pptx", Template("C:\\Code\\Scripts\\PCM CPK Automation\\TrendChart-template.pptx"), Save Layout("Title and Content") );\n'

I added Save Layout to my Save Presentation. But I get an error.

Name Unresolved: Save Layout in access or evaluation of 'Save Layout' , Save Layout( "Title and Content" ) /*###*/

Am i using Save Layout correctly?

 

 

Re: JMP Scripting - Presentation/Journal

Replying here for the updates.

Recommended Articles