<?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: Objects reference in jmp scripts in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Objects-reference-in-jmp-scripts/m-p/722835#M90509</link>
    <description>&lt;P&gt;You want to use the platform(...) function.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Scripting Index is in the Help menu" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60985i8ACA40C9003659BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="Scripting Index is in the Help menu" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Scripting Index is in the Help menu&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When a platform launches, it will attach itself to a new window if it is being created within the new window construction, or a displaybox if is is being created within a displaybox construction. Otherwise it creates a new window. The platform() function returns the root displaybox without attaching it to anything. In the past I've also recommended using a borderbox wrapper around the dt&amp;lt;&amp;lt;processScreening, but I think platform() is better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The scripting index example would make more sense like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
p=Platform(
			dt,
			Bubble Plot(
				X( :weight ),
				Y( :age ),
				Sizes( :height ),
				Title Position( 0, 0 )
			)
		);
New Window( "Platform example",
	H List Box(
		Platform(
			dt,
			Bubble Plot(
				X( :weight ),
				Y( :height ),
				Sizes( :age ),
				Title Position( 0, 0 )
			)
		),
		p
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 08 Feb 2024 12:17:05 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2024-02-08T12:17:05Z</dc:date>
    <item>
      <title>Objects reference in jmp scripts</title>
      <link>https://community.jmp.com/t5/Discussions/Objects-reference-in-jmp-scripts/m-p/722822#M90507</link>
      <description>&lt;P&gt;Hello JMP community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question regarding objects reference in jmp scripts. The below code runs (JMP pro 17.2), but the process screening pops out in a different window, not in the Make_Win function, where the button is also placed. I know that if I would copy paste the&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PS = dt &amp;lt;&amp;lt; Process Screening&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;(...);&lt;/STRONG&gt; part inside the &lt;STRONG&gt;V List Box&lt;/STRONG&gt; then the behavior becomes as expected, but then the code becomes less readable and more cluttered.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to define &lt;STRONG&gt;PS&lt;/STRONG&gt; somewhere else and only include its reference inside the function (as shown in the example below), or how else would you make the code below work as intended.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Cols = {"NPN1", "PNP1", "PNP2", "NPN2", "PNP3", "IVP1", "PNP4", "NPN3", "IVP2", "NPN4", "SIT1", "INM1", "INM2",
"VPM1", "VPM2"};
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

	PS = dt &amp;lt;&amp;lt; Process Screening(
		Y( Eval(Cols)),
		Control Chart Type( "Indiv and MR" ),
		Minimum Process Length( 1 ),
		Use Medians instead of Means( 1 ),
		Show tests( 0 ),
		Test 1( 0 ),
		Cp( 1 ),
		Spec Limits( 1 ), 
	);
	
	Make_Win = Expr( 
		New Window( "ProcessScreening", 
			Vlist_box = V List Box(
				PS,
				MyButton = Button Box( "SelectedRows", SendRows ),
			),
		),
	);

	SendRows = Expr(
		print_cols = Report( PS )[Table Box( 1 )][String Col Box( 1 )] &amp;lt;&amp;lt; getselectedrows();
		Print( Report( PS )[Table Box( 1 )][String Col Box( 1 )][print_cols] );
	);

	Make_Win();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;JNS.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 11:51:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Objects-reference-in-jmp-scripts/m-p/722822#M90507</guid>
      <dc:creator>JmpNoobScripter</dc:creator>
      <dc:date>2024-02-08T11:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Objects reference in jmp scripts</title>
      <link>https://community.jmp.com/t5/Discussions/Objects-reference-in-jmp-scripts/m-p/722832#M90508</link>
      <description>&lt;P&gt;There are many different options on doing this, here is one&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

Cols = {"NPN1", "PNP1", "PNP2", "NPN2", "PNP3", "IVP1", "PNP4", "NPN3", "IVP2", "NPN4", "SIT1", "INM1", "INM2",
"VPM1", "VPM2"};

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

ps_collector = V List Box(
	PS = dt &amp;lt;&amp;lt; Process Screening(
		Y(Eval(Cols)),
		Control Chart Type("Indiv and MR"),
		Minimum Process Length(1),
		Use Medians instead of Means(1),
		Show tests(0),
		Test 1(0),
		Cp(1),
		Spec Limits(1),

	)
);
	
SendRows = Expr(
	print_cols = Report(PS)[Table Box(1)][String Col Box(1)] &amp;lt;&amp;lt; getselectedrows();
	Print(Report(PS)[Table Box(1)][String Col Box(1)][print_cols]);
);
	
nw = New Window("ProcessScreening", Vlist_box = V List Box(ps_collector),
	Button Box("OK", sendrows);
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2024 12:04:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Objects-reference-in-jmp-scripts/m-p/722832#M90508</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-02-08T12:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Objects reference in jmp scripts</title>
      <link>https://community.jmp.com/t5/Discussions/Objects-reference-in-jmp-scripts/m-p/722835#M90509</link>
      <description>&lt;P&gt;You want to use the platform(...) function.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Scripting Index is in the Help menu" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60985i8ACA40C9003659BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="Scripting Index is in the Help menu" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Scripting Index is in the Help menu&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When a platform launches, it will attach itself to a new window if it is being created within the new window construction, or a displaybox if is is being created within a displaybox construction. Otherwise it creates a new window. The platform() function returns the root displaybox without attaching it to anything. In the past I've also recommended using a borderbox wrapper around the dt&amp;lt;&amp;lt;processScreening, but I think platform() is better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The scripting index example would make more sense like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
p=Platform(
			dt,
			Bubble Plot(
				X( :weight ),
				Y( :age ),
				Sizes( :height ),
				Title Position( 0, 0 )
			)
		);
New Window( "Platform example",
	H List Box(
		Platform(
			dt,
			Bubble Plot(
				X( :weight ),
				Y( :height ),
				Sizes( :age ),
				Title Position( 0, 0 )
			)
		),
		p
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Feb 2024 12:17:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Objects-reference-in-jmp-scripts/m-p/722835#M90509</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-02-08T12:17:05Z</dc:date>
    </item>
  </channel>
</rss>

