<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Applying the broadcasting command to a set of Outline Boxes in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45995#M26225</link>
    <description>&lt;P&gt;Many thanks for both suggestions - I'll use one of the suggested workarounds, both of which will do the job just as well.&amp;nbsp; As always, it's useful to know that there isn't a trivial trick that I just missed :)&lt;/img&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2017 14:56:11 GMT</pubDate>
    <dc:creator>DMR</dc:creator>
    <dc:date>2017-10-16T14:56:11Z</dc:date>
    <item>
      <title>Applying the broadcasting command to a set of Outline Boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45632#M26071</link>
      <description>&lt;P&gt;Hi - I have a JSL script that sends a number of Outline Boxes to the journal from within a for loop (i.e. each cycle of the loop creates a new Outline Box, of which I send a copy to the journal as soon as it is created). Is there a way I can make the resulting&amp;nbsp;set of Outline Boxes within the journal open or close in unison by using the broadcasting key combination (i.e. holding down the &amp;lt;Ctrl&amp;gt; key while opening or closing just one of them)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've written a number of applications in which I want to be able to do this. In some of them I seem to have inadvertantly incorporated this functionality anyway, whereas in others I haven't - but I can't work out where the difference lies in the way that I've scripted them. In all instances, the Outline Boxes contain an identically-formatted data summary in which the only difference lies in the actual numbers being summarized.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for any suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 20:07:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45632#M26071</guid>
      <dc:creator>DMR</dc:creator>
      <dc:date>2017-10-07T20:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Applying the broadcasting command to a set of Outline Boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45692#M26095</link>
      <description>&lt;P&gt;From my experience if you make the outline box titles match then they all open or all close with the control key (on windows).&amp;nbsp; Right clicking on one and hovering over 'Close all like this' brings up a tool tip that indicates that identical help keys has the same effect but I have not found references to using help keys in journals or JSL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="mass open.PNG" style="width: 131px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/7926i19FD6CE1679AE33B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mass open.PNG" alt="mass open.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 19:42:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45692#M26095</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2017-10-09T19:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Applying the broadcasting command to a set of Outline Boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45964#M26208</link>
      <description>&lt;P&gt;Hi - thanks for this, and&amp;nbsp;I've verified that indeed if the outline boxes all have the same title, I can then open and close them simultaneously with a broadcasted open/close command. Unfortunately I do actually need them to have different titles, since once they're all closed, I can't easily tell which one(s) I specifically want to open.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've found an example of one of my scripts working the way I want - but&amp;nbsp;it relates to a situation in which I'm sending multiple copies of the Graph Builder output to the journal from within a for loop. With each run of the loop, I change the variables that the Graph Builder is plotting, and I then send a copy to the journal before running the next one. The relevant part of the script works like this:&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;  dt = Open( "$SAMPLE_DATA/Owl Diet.JMP" );

yList = dt &amp;lt;&amp;lt; get column names(string);
remove from(yList, nItems(yList));

show(yList);

// Create the chart as I want it to look for the first item on the list, and send a copy of it to the journal;

gb = Graph Builder(
	Show Control Panel( 0 ),
	Size( 600, 250 ),
	Show Legend( 0 ),	
	Variables( X( :species ), Y( as column(column(dt, yList[1])) ) ),
	Elements( Box Plot( X, Y, Legend( 6 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			OutlineBox,
			{Set Title( "Analysis of " || title case(yList[1]) )}
		),
		Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
		Dispatch( {}, "400", LegendBox, {Set Title( "" )} )
	)
);

report(gb) &amp;lt;&amp;lt; journal();

// Then run all the others in sequence by each time replacing the current Y variable with the next one, and adding them to the journal as we go;

for(i=2, i&amp;lt;=nItems(yList), i++,

	gbb = report(gb);
	
	gbb &amp;lt;&amp;lt; Dispatch( {}, "Graph Builder",   OutlineBox,  {Set Title( "Analysis of " || title case(yList[i]) )} );

	gbb[GraphBuilderBox(1)] &amp;lt;&amp;lt; remove variable(2);
	gbb[GraphBuilderBox(1)] &amp;lt;&amp;lt; add variable({as column(column(dt, yList[i])), role("Y")});
	
	gbb &amp;lt;&amp;lt; journal()
	
);
	
// Finally, close the original chart window;

gb &amp;lt;&amp;lt; close window;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;The broadcasting command works in this instance, presumably because all the charts are actually called "Graph Builder" despite all having been given different labels - and it's this effect that I want to reproduce when I'm sending outline boxes to the journal that &lt;EM&gt;weren't&lt;/EM&gt; created using the Graph Builder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions are welcome, though I may be asking the impossible.&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2017 11:24:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45964#M26208</guid>
      <dc:creator>DMR</dc:creator>
      <dc:date>2017-10-15T11:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Applying the broadcasting command to a set of Outline Boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45984#M26223</link>
      <description>&lt;P&gt;This must be due to the common HelpKey shared by all of the graph builder outputs. The best reference I found to HelpKeys was &lt;A href="https://community.jmp.com/t5/Discussions/Graph-Builder-how-to-change-the-color-of-an-element-and/m-p/39521" target="_blank"&gt;here&lt;/A&gt;, maybe &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/1855"&gt;@Justin_Chilton&lt;/a&gt;&amp;nbsp;can shed some light on whether the HelpKey can be set when sending something to a Journal, or modified for an item in the Journal? If that is not possible a workaround would be to insert a text item between each output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="byspecies.PNG" style="width: 228px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8004i2BBB181B568AE5B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="byspecies.PNG" alt="byspecies.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you move the graph builder output under an outline box you can see the HelpKey using 'show tree structure':&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="HelpKey.png" style="width: 333px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8003iB615DFAF3864E887/image-size/large?v=v2&amp;amp;px=999" role="button" title="HelpKey.png" alt="HelpKey.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 13:05:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45984#M26223</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2017-10-16T13:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Applying the broadcasting command to a set of Outline Boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45991#M26224</link>
      <description>&lt;P&gt;Unfortunately, it is not possible for you to change the helpKey values, as they are relied on by JMP.&lt;/P&gt;
&lt;P&gt;However, you could create a button that expaned/collapses all of the OutlineBoxes instead of using the control key, relying on OutlineBox titles and helpKeys. See my example below for details&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Owl Diet.jmp" );

yList = dt &amp;lt;&amp;lt; get column names( string );

Remove From( yList, N Items( yList ) );

nw = New Window( "Example",
	Button Box( "Collapse All",
		&amp;lt;&amp;lt;Set Function(
			Function( {this},
				{Default Local},
				// this &amp;lt;&amp;lt; sib refers to the variable 'vlb' but I used this sibling relationship to 
				// ensure it works even if you move it to a journal
				// This Xpath command will grab all OutlineBoxes that are children of the V List Box
				// Using an xpath query of "//OutlineBox" would be simpler, but would cause child
				// OutlineBoxes of the Distribution to also be collapsed. This method ensures we only 
				// get the top level OutlineBoxes
				topLevelOutlineBoxes = (this &amp;lt;&amp;lt; sib) &amp;lt;&amp;lt; XPath( "/ListBox/OutlineBox" );
				// Account for Graph Builder case where there is an extra level between the ListBox
				// and the OutlineBox
				Insert INto( topLevelOutlineBoxes, (this &amp;lt;&amp;lt; sib) &amp;lt;&amp;lt; XPath( "/ListBox/*/OutlineBox" ) );
				// If we want to collapse
				If( this &amp;lt;&amp;lt; Get button name == "Collapse All", 
					// close all of the top level OutlineBoxes
					topLevelOutlineBoxes &amp;lt;&amp;lt; Set Open( 0 );
					// Change the button name
					this &amp;lt;&amp;lt; set button name( "Expand All" );
				,
					// open all of the top level OutlineBoxes
					topLevelOutlineBoxes &amp;lt;&amp;lt; Set Open( 1 );
					// Change the button name
					this &amp;lt;&amp;lt; set button name( "Collapse All" );
				);
			)
		)
	),
	vlb = V List Box()
);

// append a graph builder and a distribution for each Y variable to the V LIst Box
For( i = 1, i &amp;lt;= N Items( yList ), i++,
	vlb &amp;lt;&amp;lt; Append(
		dt &amp;lt;&amp;lt; Graph Builder(
			Show Control Panel( 0 ),
			Show Legend( 0 ),
			Variables( X( :species ), Y( As Column( Column( dt, yList[i] ) ) ) ),
			Elements( Box Plot( X, Y, Legend( 6 ) ) ),
			SendToReport(
				Dispatch(
					{},
					"Graph Builder",
					OutlineBox,
					{Set Title( "Analysis of " || Titlecase( yList[i] ) )}
				),
				Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
				Dispatch( {}, "400", LegendBox, {Set Title( "" )} )
			)
		)
			
	);
	vlb &amp;lt;&amp;lt; Append(
		dt &amp;lt;&amp;lt; Distribution(
			Stack( 1 ),
			Continuous Distribution(
				Column( :skull length ),
				Horizontal Layout( 1 ),
				Vertical( 0 )
			)
		)
	);
);

// if you really want a journal
nw &amp;lt;&amp;lt; Journal();
nw &amp;lt;&amp;lt; Close Window();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expanded" style="width: 867px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8006i39D2B09A39ABD47A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Expanded" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Expanded&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Collapsed" style="width: 326px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8007iF1DABB565AD0D05D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Collapsed" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Collapsed&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 14:27:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45991#M26224</guid>
      <dc:creator>Justin_Chilton</dc:creator>
      <dc:date>2017-10-16T14:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Applying the broadcasting command to a set of Outline Boxes</title>
      <link>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45995#M26225</link>
      <description>&lt;P&gt;Many thanks for both suggestions - I'll use one of the suggested workarounds, both of which will do the job just as well.&amp;nbsp; As always, it's useful to know that there isn't a trivial trick that I just missed :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 14:56:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Applying-the-broadcasting-command-to-a-set-of-Outline-Boxes/m-p/45995#M26225</guid>
      <dc:creator>DMR</dc:creator>
      <dc:date>2017-10-16T14:56:11Z</dc:date>
    </item>
  </channel>
</rss>

