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
UserID16644
Level V

Powerpoint slide title using column value

Hi all,

I am trying to create a graph using a subset data. And I needed the column value to be concatenated into the slide's title. For example, the title of the slide is "Data for 2023_" and I need to add what specific sex the data is for. Output should be "Data for 2023_Male" and "Data for 2023_Female". Here is the code I have created

 

For( v=1, v <= N items (dt_sub), v++, 
hb1 = HlistBox();
sex_key= Column(dt_sub[v], "Sex") << get values;
hb1 << Append(Eval(Parse(EvalInsert("dt_graphs^v^"))));
hb1a = hb1 << get picture;
ppt1 = OutlineBox("Date for 2023_" || char(sex_key) || ")", hb1a);
ppt1 << savepresentation( pathppt, append, PNG );
);

But the output title of the box is Data for 2023_=Scriptable[]

Please help

2 REPLIES 2
jthi
Super User

Re: Powerpoint slide title using column value

Which version of JMP are you using? Create new window of your ppt1 and check that the outline box is correct there. I'm using JMP17 and this is working correctly (if I understand what you are trying to do)

Names Default To Here(1);

dt_sub = Eval List({Open("$SAMPLE_DATA/Big Class.jmp")});
dt_graphs1 = dt_sub[1] << get as report;

hb1 = H List Box();
hb1 << Append(Eval(Parse(Eval Insert("dt_graphs^v^"))));
hb1a = hb1 << get picture;

sex_key = Column(dt_sub[v], "Sex") << get values;
ppt1 = Outline Box("Date for 2023_" || Char(sex_key) || ")", hb1a);

ppt1 << Save Presentation("$TEMP/jmp_example.pptx", append, "PNG");

nw = New Window("", ppt1); // use this to verify
Open("$TEMP");

Display Box Messages (jmp.com)

jthi_0-1700643857791.png

 

-Jarmo
hogi
Level XII

Re: Powerpoint slide title using column value

or something like this?

hogi_0-1700683367884.png

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt_sub = Data Table( "Big Class" ) << Subset(By( :sex ));

pathppt = "C:\temp\ppt.pptx";

For( v=1, v <= N items (dt_sub), v++, 
//v= 1;
hb1 = HlistBox();
sex_key= dt_sub[v]<<  get name;
hb1 << Append(dt_sub[v] << get as report);
ppt1 = OutlineBox("Date for 2023 " || sex_key, hb1);
ppt1 << savepresentation( pathppt, append, "PNG" );
);