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%3EGuardar%20presentaci%C3%B3n%26gt%3B%20Colocaci%C3%B3n%20de%20cuadro%20de%20lista%20H%3A%20%C2%BFC%C3%B3mo%20dejar%20algo%20de%20espacio%20en%20la%20parte%20superior%20de%20cada%20diapositiva%20(ver%20script%20de%20prueba)%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-253577%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHola%20comunidad%20JMP%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETengo%20un%20problema%20aparentemente%20simple%20que%20no%20he%20podido%20resolver%3A%20construyo%20un%20script%20simple%20para%20reunir%20tramas%20de%20diferentes%20revistas%20en%20diapositivas%20individuales%20en%20una%20presentaci%C3%B3n%20de%20PowerPoint.%20Hasta%20ahora%2C%20las%20cosas%20funcionan%20bien%2C%20excepto%20que%20las%20parcelas%20est%C3%A1n%20todas%20pegadas%20en%20la%20parte%20superior%20de%20cada%20diapositiva%20-%26gt%3B%20%C2%BFcu%C3%A1l%20es%20la%20mejor%20manera%20de%20incluir%20un%20espaciador%20en%20mi%20cuadro%20de%20lista%20H%20o%20mi%20cuadro%20de%20alineaci%C3%B3n%20para%20evitar%20este%20problema%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%3EGracias%20por%20tu%20ayuda.%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%3A%20Guardar%20presentaci%C3%B3n%26gt%3B%20Colocaci%C3%B3n%20de%20cuadro%20de%20lista%20H%3A%20%C2%BFC%C3%B3mo%20dejar%20algo%20de%20espacio%20en%20la%20parte%20superior%20de%20cada%20diapositiva%20(ver%20script%20de%20prueba)%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-253581%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EAqu%C3%AD%20hay%20un%20ejemplo%20simple%20de%20c%C3%B3mo%20hago%20el%20espacio%20que%20est%C3%A1s%20buscando%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%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%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