turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Saving multiple pngs in one journal

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 15, 2017 8:11 AM
(2126 views)

I have code that creates many distributions given the reticle and wafer and was wondering how to save it in one report? Right now it only saves the first picture!

Thanks for all the help!

bivDistribution = Distribution**(** by**(**Column_Wafer,Column_Reticle**)**,

Y**(** Eval**(**Column_MaxIc**)** **)**,

X**(** Eval**(**Column_Area**)** **)**,

**)**;

bivDistribution << **Save Journal(**"Example.jrn", jrn**)**;

2 ACCEPTED SOLUTIONS

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

The by goup makes JMP produce a list of reports. When you send a message to a list, the message is applied to each item in the list. In the original example, all of the reports were journalled, one at a time, and each one over-wrote the previous, leaving only the final report. There is a parent box holding all of the reports, and that is what needs to be journalled.

```
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dist = dt << Distribution( Y( :weight ), By( :age ) );
// dist is a list of reports:
// {Distribution[], Distribution[], Distribution[], Distribution[], Distribution[], Distribution[]}
dist rep = dist << Report;
// dist rep is a list of displayboxes:
// {DisplayBox[OutlineBox], DisplayBox[OutlineBox], DisplayBox[OutlineBox], DisplayBox[ OutlineBox], DisplayBox[OutlineBox], DisplayBox[OutlineBox]}
// the parent box of any of the boxes is the container for all of the boxes, and
// that parent is what you want to journal. [1] should be a good choice to find the parent.
(dist rep[1]<<parent) << Save Journal( "$temp/x.jrn","jrn" );
open("$temp/x.jrn")
```

I forgot to add the [1] the first time I did this, and it works...slowly. It used all of the reports, one at a time, to find the parent and journal all of the reports. By adding the [1], the list becomes a single report and it goes much faster.

Craige

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

status appears to be a list with one element, and at the end, maybe two elements. It looks like you are trying to read the 2nd element before it is created. NItems(status) will tell you how many items are in the list.

Craige

6 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

You need to send the Save Journal() message to the report layer of the platform, not the analysis layer. Like this:

```
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dist = dt << Distribution( Y( :weight ), By( :age ) );
dist rep = dist << Report;
dist rep << Save Journal( "desired path" );
```

Learn it once, use it forever!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

The by goup makes JMP produce a list of reports. When you send a message to a list, the message is applied to each item in the list. In the original example, all of the reports were journalled, one at a time, and each one over-wrote the previous, leaving only the final report. There is a parent box holding all of the reports, and that is what needs to be journalled.

```
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dist = dt << Distribution( Y( :weight ), By( :age ) );
// dist is a list of reports:
// {Distribution[], Distribution[], Distribution[], Distribution[], Distribution[], Distribution[]}
dist rep = dist << Report;
// dist rep is a list of displayboxes:
// {DisplayBox[OutlineBox], DisplayBox[OutlineBox], DisplayBox[OutlineBox], DisplayBox[ OutlineBox], DisplayBox[OutlineBox], DisplayBox[OutlineBox]}
// the parent box of any of the boxes is the container for all of the boxes, and
// that parent is what you want to journal. [1] should be a good choice to find the parent.
(dist rep[1]<<parent) << Save Journal( "$temp/x.jrn","jrn" );
open("$temp/x.jrn")
```

I forgot to add the [1] the first time I did this, and it works...slowly. It used all of the reports, one at a time, to find the parent and journal all of the reports. By adding the [1], the list becomes a single report and it goes much faster.

Craige

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Your solution worked beautifully! Now I am trying to implement it into a

GUI I made where it reads in a datatable and was hoping you could help with

the error it gives me!

Thanks for your expertise!

This is the error: "Subscript Range in access or evaluation of 'Subscript'

, status[/*###*/2]"

//Call CreateBivariate to do a bivariate (two variable) analysis

//list allows you to do more analysis

status = List*(0)*;

New Window*(*"Analysis for MaxIc Vs. Corrected Area",

H List Box*(*

V List Box*(*;

Panel Box*(*"Controls",

Text Box*(*"Choose Analysis"*)*,

choice = Check Box*({*"Distribution for Current Vs. Area with", "Generate

Report"*}*,

current = choice << *Get(1)*;

xParam = Column_Area; //Corrected Area

yParam = Column_MaxIc; //Max Ic

x1Param = Column_NomArea; // Nominal Area

y1Param = Column_InverseRes;

//Get the distribution

If*(* And*(* current, Not*(*status*[**1]* *)* *)*,

dt << *Append(*

dt = V List Box*(*

bivDistribution = Distribution*(* by*(*Column_Wafer,Column_Reticle*)*,

Y*(* Eval*(*yParam*)* *)*,

X*(* Eval*(*xParam*)* *)*,

*)*;

*)*

*)*;

status*[**1]*=*1*; //mark as present

*)*;

current = choice << *Get(2)*;

//Get the distribution

If*(* And*(* current, Not*(*status*[**2]* *)* *)*,

dt << *Send to Report(*

//This is the report for the distribution of the Max Ics versus the

Corrected Area

bivDistribution = Distribution*(* by*(*Column_Wafer,Column_Reticle*)*,

Y*(* Eval*(*yParam*)* *)*,

X*(* Eval*(*xParam*)* *)*,

*)*;

*)*;

//dist_report = bivDistribution << Report;

//(dist_report << parent) <Sandbox\Gingrich\69977JM\MaxIc_CorArea.jrn") ) ;

*(*dt << *parent)* <<*Save Journal**((*"Example.jrn"*)* *)* ;

status*[**2]*=*1*; //mark as present

*)*;

*)*

*)*

*)*,

dt = V List Box*()*,

*)*

*)*;

GUI I made where it reads in a datatable and was hoping you could help with

the error it gives me!

Thanks for your expertise!

This is the error: "Subscript Range in access or evaluation of 'Subscript'

, status[/*###*/2]"

//Call CreateBivariate to do a bivariate (two variable) analysis

//list allows you to do more analysis

status = List*(0)*;

New Window*(*"Analysis for MaxIc Vs. Corrected Area",

H List Box*(*

V List Box*(*;

Panel Box*(*"Controls",

Text Box*(*"Choose Analysis"*)*,

choice = Check Box*({*"Distribution for Current Vs. Area with", "Generate

Report"*}*,

current = choice << *Get(1)*;

xParam = Column_Area; //Corrected Area

yParam = Column_MaxIc; //Max Ic

x1Param = Column_NomArea; // Nominal Area

y1Param = Column_InverseRes;

//Get the distribution

If*(* And*(* current, Not*(*status*[**1]* *)* *)*,

dt << *Append(*

dt = V List Box*(*

bivDistribution = Distribution*(* by*(*Column_Wafer,Column_Reticle*)*,

Y*(* Eval*(*yParam*)* *)*,

X*(* Eval*(*xParam*)* *)*,

*)*;

*)*

*)*;

status*[**1]*=*1*; //mark as present

*)*;

current = choice << *Get(2)*;

//Get the distribution

If*(* And*(* current, Not*(*status*[**2]* *)* *)*,

dt << *Send to Report(*

//This is the report for the distribution of the Max Ics versus the

Corrected Area

bivDistribution = Distribution*(* by*(*Column_Wafer,Column_Reticle*)*,

Y*(* Eval*(*yParam*)* *)*,

X*(* Eval*(*xParam*)* *)*,

*)*;

*)*;

//dist_report = bivDistribution << Report;

//(dist_report << parent) <Sandbox\Gingrich\69977JM\MaxIc_CorArea.jrn") ) ;

*(*dt << *parent)* <<*Save Journal**((*"Example.jrn"*)* *)* ;

status*[**2]*=*1*; //mark as present

*)*;

*)*

*)*

*)*,

dt = V List Box*()*,

*)*

*)*;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

status appears to be a list with one element, and at the end, maybe two elements. It looks like you are trying to read the 2nd element before it is created. NItems(status) will tell you how many items are in the list.

Craige

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 15, 2017 12:35 PM
(2091 views)
| Posted in reply to message from Craige_Hales 08/15/2017 03:29 PM

Now it gives me this error?

Send Expects Scriptable Object in access or evaluation of 'Send' , (dt <<

parent[1]) << /*###*/Save Journal(

"T:\W\Wintermute\50 Sandbox\Gingrich\69977JM\MaxIc_CorArea.jrn"

) /*###*/

Send Expects Scriptable Object in access or evaluation of 'Send' , (dt <<

parent[1]) << /*###*/Save Journal(

"T:\W\Wintermute\50 Sandbox\Gingrich\69977JM\MaxIc_CorArea.jrn"

) /*###*/

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

<< is the JSL * send *operator. It is used to send a message, like the Save Journal message, to an object that can be scripted (a

Note that you have two send operators. The second one is complaining, but the first one needs to be fixed before the 2nd one can have a chance to work. Currently the dt object is ignoring a message it doesn't understand.

Use

show(dt);

before the statement that fails and look in the log window to get some idea of what is going on.

Craige