<?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 //GraphBuilderGroupBox &amp;lt;&amp;lt; Get Window Title issue in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/GraphBuilderGroupBox-lt-lt-Get-Window-Title-issue/m-p/423554#M67261</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do you know how to get the&amp;nbsp;GraphBuilderGroupBox "name" from the JSL scripting level? In attached picture it would be "Male" or "Female" (marked in red circles). My guess is to have a similar command to&amp;nbsp;&amp;lt;&amp;lt; xpath( "//GraphBuilderGroupBox" )) &amp;lt;&amp;lt; Get Window Title. However it doesn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Academic Achievement.jmp" );

win = dt &amp;lt;&amp;lt; Graph Builder(
    Size( 570, 475 ),
    Variables( X( :Year4 ), Y( :Year2 ), Group X( :Female ) ),
    Elements( Points( X, Y, Legend( 8 ) ), Smoother( X, Y, Legend( 9 ) ) )
);

GroupBoxName = (win &amp;lt;&amp;lt; xpath( "//GraphBuilderGroupBox" )) &amp;lt;&amp;lt; Get Window Title; //&amp;lt;&amp;lt;Class Name

Show( GroupBoxName );&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;I need it in my extended code, where I paste FrameBoxes from different tables on one GB. Frameboxes keep "correct" location as long as I do not use Local Data Filter, otherwise plotted data is messed up. I use JMP 16.1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your advices!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Li&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-inline" image-alt="InkedGroupBox.jpg" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36307i221CD3CDA6D9FDD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="InkedGroupBox.jpg" alt="InkedGroupBox.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jun 2023 11:18:03 GMT</pubDate>
    <dc:creator>LiPav</dc:creator>
    <dc:date>2023-06-11T11:18:03Z</dc:date>
    <item>
      <title>//GraphBuilderGroupBox &lt;&lt; Get Window Title issue</title>
      <link>https://community.jmp.com/t5/Discussions/GraphBuilderGroupBox-lt-lt-Get-Window-Title-issue/m-p/423554#M67261</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do you know how to get the&amp;nbsp;GraphBuilderGroupBox "name" from the JSL scripting level? In attached picture it would be "Male" or "Female" (marked in red circles). My guess is to have a similar command to&amp;nbsp;&amp;lt;&amp;lt; xpath( "//GraphBuilderGroupBox" )) &amp;lt;&amp;lt; Get Window Title. However it doesn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Academic Achievement.jmp" );

win = dt &amp;lt;&amp;lt; Graph Builder(
    Size( 570, 475 ),
    Variables( X( :Year4 ), Y( :Year2 ), Group X( :Female ) ),
    Elements( Points( X, Y, Legend( 8 ) ), Smoother( X, Y, Legend( 9 ) ) )
);

GroupBoxName = (win &amp;lt;&amp;lt; xpath( "//GraphBuilderGroupBox" )) &amp;lt;&amp;lt; Get Window Title; //&amp;lt;&amp;lt;Class Name

Show( GroupBoxName );&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;I need it in my extended code, where I paste FrameBoxes from different tables on one GB. Frameboxes keep "correct" location as long as I do not use Local Data Filter, otherwise plotted data is messed up. I use JMP 16.1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your advices!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Li&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-inline" image-alt="InkedGroupBox.jpg" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36307i221CD3CDA6D9FDD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="InkedGroupBox.jpg" alt="InkedGroupBox.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:18:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/GraphBuilderGroupBox-lt-lt-Get-Window-Title-issue/m-p/423554#M67261</guid>
      <dc:creator>LiPav</dc:creator>
      <dc:date>2023-06-11T11:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: //GraphBuilderGroupBox &lt;&lt; Get Window Title issue</title>
      <link>https://community.jmp.com/t5/Discussions/GraphBuilderGroupBox-lt-lt-Get-Window-Title-issue/m-p/423570#M67262</link>
      <description>&lt;P&gt;No sure if you can access those "names" (groupings) from graph builder. You can check what you can access with Xpath by using &amp;lt;&amp;lt; Get XML on win variable and based on that there is no mention of "Female" and "Male". Also checking from Show Tree Structure and Show Properties I cannot see them there either:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1633420318543.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36300i50CE781AE7A8076C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1633420318543.png" alt="jthi_0-1633420318543.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To get a reference to GraphBuilderGroupBox you can use:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gbgb = Report(win)[GraphBuilderGroupBox(1)];
//or
gbgb = (win &amp;lt;&amp;lt; XPath("//GraphBuilderGroupBox"))[1]; //it is a list so use index&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Accessing the Group X can be done with Variable, but I'm not sure if it will be helpful here:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Academic Achievement.jmp");

win = dt &amp;lt;&amp;lt; Graph Builder(
	Size(570, 475),
	Variables(X(:Year4), Y(:Year2), Group X(:Female)),
	Elements(Points(X, Y, Legend(8)), Smoother(X, Y, Legend(9)))
);
//win &amp;lt;&amp;lt; get xml
gbb = Report(win)[Graph Builder Box(1)];
wait(1);
gbb &amp;lt;&amp;lt; Remove Variable(3);
gbb &amp;lt;&amp;lt; Add Variable({:Female Binary, Role("Group X")});&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;If you need just the values of Female column, you can get them directly from datatable. As these are value labels, you have to get value label property&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(Column(dt, "Female") &amp;lt;&amp;lt; Get Column Properties())["Value Labels"]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 08:00:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/GraphBuilderGroupBox-lt-lt-Get-Window-Title-issue/m-p/423570#M67262</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-10-05T08:00:47Z</dc:date>
    </item>
  </channel>
</rss>

