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

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-253577%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EEnregistrer%20la%20pr%C3%A9sentation%20%26gt%3B%20Emplacement%20de%20la%20zone%20de%20liste%20H%26nbsp%3B%3A%20Comment%20laisser%20de%20l'espace%20en%20haut%20de%20chaque%20diapositive%20(voir%20le%20script%20de%20test)%26nbsp%3B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-253577%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESalut%20la%20communaut%C3%A9%20JMP%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJ'ai%20un%20probl%C3%A8me%20apparemment%20simple%20que%20je%20n'ai%20pas%20%C3%A9t%C3%A9%20en%20mesure%20de%20r%C3%A9soudre%26nbsp%3B%3A%20je%20construis%20un%20script%20simple%20pour%20rassembler%20des%20trac%C3%A9s%20de%20diff%C3%A9rents%20journaux%20dans%20des%20diapositives%20uniques%20dans%20une%20pr%C3%A9sentation%20PowerPoint.%20Jusqu'%C3%A0%20pr%C3%A9sent%2C%20les%20choses%20fonctionnent%20bien%20sauf%20que%20les%20trac%C3%A9s%20sont%20tous%20bloqu%C3%A9s%20en%20haut%20de%20chaque%20diapositive%20-%26gt%3B%20quelle%20est%20la%20meilleure%20fa%C3%A7on%20d'inclure%20un%20Spacer%20dans%20ma%20H%20List%20Box%20ou%20ma%20Lineup%20Box%20pour%20%C3%A9viter%20ce%20probl%C3%A8me%26nbsp%3B%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20to%20Here%20(1)%3B%0A%0Adummy%20%3D%20H%20List%20Box%20()%3B%0A%0Adummy%20%26lt%3B%26lt%3B%20Save%20Presentation%20(%22%24Desktop%2FTEMP%20PNG%2FZ1.pptx%22%2C%20Outline%20Titles%20(Top%20Left))%3B%0A%0Ajrn1%20%3D%20Get%20Window(%22FIRST_JOURNAL%22)%3B%0Ajrn2%20%3D%20Get%20Window(%22SECOND_JOURNAL%22)%3B%0A%0AFor%20(i%20%3D%201%2C%20i%20%26lt%3B%3D5%2C%20i%2B%2B%2C%20%0A%20Plot1%20%3D%20jrn1%20%5BPictureBox(i)%5D%3B%0A%20Plot2%20%3D%20jrn2%20%5BPictureBox(i)%5D%3B%0A%0A%20MylpBox%20%3D%20Lineup%20Box%20(N%20Col%20(2))%3B%0A%20MylpBox%20%26lt%3B%26lt%3B%20Append%20(Plot1)%3B%0A%20MylpBox%20%26lt%3B%26lt%3B%20Append%20(Plot2)%3B%0A%0A%20myhlb%20%3D%20H%20List%20Box%20()%3B%0A%20myhlb%20%26lt%3B%26lt%3B%20Append%20(Spacer%20Box%20(0%2C1))%3B%20%2F%2F%20this%20does%20not%20work%0A%20myhlb%20%26lt%3B%26lt%3B%20Append%20(MylpBox%20%26lt%3B%26lt%3B%20get%20picture)%3B%0A%20myhlb%20%26lt%3B%26lt%3B%20Save%20Presentation%20(%22%24Desktop%2FTEMP%20PNG%2FZ1.pptx%22%2C%20append%2C%20Outline%20Titles%20(Top%20Left))%3B%0A%20%0A)%3B%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EMerci%20pour%20votre%20aide.%3C%2FP%3E%3CP%3ETS%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-253581%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%26nbsp%3B%3A%20Enregistrer%20la%20pr%C3%A9sentation%26nbsp%3B%26gt%3B%20Emplacement%20de%20la%20zone%20de%20liste%20H%26nbsp%3B%3A%20Comment%20laisser%20de%20l'espace%20en%20haut%20de%20chaque%20diapositive%20(voir%20le%20script%20de%20test)%26nbsp%3B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-253581%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EVoici%20un%20exemple%20simple%20de%20la%20fa%C3%A7on%20dont%20je%20fais%20l'espacement%20que%20vous%20recherchez%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0AOpen(%20%22%24SAMPLE_DATA%2Fbig%20class.jmp%22%20)%3B%0A%0A%2F%2F%20Create%20the%20output%20you%20need%0Abiv%20%3D%20bivariate(%20x(%20%3Aheight%20)%2C%20y(%20%3Aweight%20)%20)%3B%0Aplot1%20%3D%20Report(%20biv%20)%3B%0A%0A%2F%2F%20Create%20a%20display%20area%20with%20the%20spacer%20box%20in%20it%20%0Avlb%20%3D%20V%20List%20Box(%20nn%20%3D%20V%20List%20Box(%20Spacer%20Box(%20size(%201%2C%2050%20)%20)%20)%20)%3B%0A%0A%2F%2F%20add%20in%20the%20part%20of%20the%20display%20that%20you%20want%20to%20be%20lower%0Ann%20%26lt%3B%26lt%3B%20append(%20plot1%5BPicture%20Box(%201%20)%5D%20)%3B%0A%0A%2F%2F%20Add%20the%20display%20area%20to%20the%20outline%20box%20that%20has%20the%20title%20%0Aplot1%5BOutline%20Box(%201%20)%5D%20%26lt%3B%26lt%3B%20prepend(%20vlb%20%26lt%3B%26lt%3B%20get%20picture%20)%3B%0A%0A%2F%2F%20Delete%20the%20area%20of%20the%20display%20that%20you%20have%20turned%0A%2F%2F%20into%20a%20picture%20object%20and%20placed%20it%20just%20below%20the%20outline%20box%0Aplot1%5BPicture%20Box(%201%20)%5D%20%26lt%3B%26lt%3B%20delete%3B%0A%0Aplot1%20%26lt%3B%26lt%3B%20Save%20Presentation(%20%22%24TEMP%2FZ1.pptx%22%2C%20append%2C%20Outline%20Titles(%20Top%20Left%20)%20)%3B%0A%0A%0AOpen(%20%22%24TEMP%2FZ1.pptx%22%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22space.PNG%22%20style%3D%22width%3A%20871px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22space.PNG%22%20style%3D%22width%3A%20871px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22space.PNG%22%20style%3D%22width%3A%20871px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F22450i83494567A2FF1B43%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22space.PNG%22%20alt%3D%22space.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Thierry_S
Super User

Save Presentation > H List Box Placement: How to leave some space at the top of each slide (see testing script)?

Hi JMP Community,

 

I have a apparently simple problem that I have not been able to resolve: I building a simple script to gather plots from different journals into single slides in a PowerPoint presentation. So far, things are working well except that the plots are all stuck at the top of each slide -> what is the best way to include a Spacer in my H List Box or my Lineup Box to avoid this problem?

 

Names Default to Here (1);

dummy = H List Box ();

dummy << Save Presentation ("$Desktop/TEMP PNG/Z1.pptx", Outline Titles (Top Left));

jrn1 = Get Window("FIRST_JOURNAL");
jrn2 = Get Window("SECOND_JOURNAL");

For (i = 1, i <=5, i++, 
	Plot1 = jrn1 [PictureBox(i)];
	Plot2 = jrn2 [PictureBox(i)];

	MylpBox = Lineup Box (N Col (2));
	MylpBox << Append (Plot1);
	MylpBox << Append (Plot2);

	myhlb = H List Box ();
	myhlb << Append (Spacer Box (0,1)); // this does not work
	myhlb << Append (MylpBox << get picture);
	myhlb << Save Presentation ("$Desktop/TEMP PNG/Z1.pptx", append, Outline Titles (Top Left));
	
);	

Thank you for your help.

TS

 

 

Thierry R. Sornasse
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Save Presentation > H List Box Placement: How to leave some space at the top of each slide (see testing script)?

Here is a simple example of how I do the spacing you are looking for

Names Default To Here( 1 );

Open( "$SAMPLE_DATA/big class.jmp" );

// Create the output you need
biv = bivariate( x( :height ), y( :weight ) );
plot1 = Report( biv );

// Create a display area with the spacer box in it 
vlb = V List Box( nn = V List Box( Spacer Box( size( 1, 50 ) ) ) );

// add in the part of the display that you want to be lower
nn << append( plot1[Picture Box( 1 )] );

// Add the display area to the outline box that has the title 
plot1[Outline Box( 1 )] << prepend( vlb << get picture );

// Delete the area of the display that you have turned
// into a picture object and placed it just below the outline box
plot1[Picture Box( 1 )] << delete;

plot1 << Save Presentation( "$TEMP/Z1.pptx", append, Outline Titles( Top Left ) );


Open( "$TEMP/Z1.pptx" );

space.PNG

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Save Presentation > H List Box Placement: How to leave some space at the top of each slide (see testing script)?

Here is a simple example of how I do the spacing you are looking for

Names Default To Here( 1 );

Open( "$SAMPLE_DATA/big class.jmp" );

// Create the output you need
biv = bivariate( x( :height ), y( :weight ) );
plot1 = Report( biv );

// Create a display area with the spacer box in it 
vlb = V List Box( nn = V List Box( Spacer Box( size( 1, 50 ) ) ) );

// add in the part of the display that you want to be lower
nn << append( plot1[Picture Box( 1 )] );

// Add the display area to the outline box that has the title 
plot1[Outline Box( 1 )] << prepend( vlb << get picture );

// Delete the area of the display that you have turned
// into a picture object and placed it just below the outline box
plot1[Picture Box( 1 )] << delete;

plot1 << Save Presentation( "$TEMP/Z1.pptx", append, Outline Titles( Top Left ) );


Open( "$TEMP/Z1.pptx" );

space.PNG

Jim

Recommended Articles