<?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: JSL Turning on Spec Limits &amp;quot;Show as Graph Reference Lines&amp;quot; in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Turning-on-Spec-Limits-quot-Show-as-Graph-Reference-Lines/m-p/212383#M42523</link>
    <description>&lt;P&gt;If I am interpreting your code properly, what you are doing is copying your limits from the limits table, into the column properties for your data table.&amp;nbsp; If this is the case, you may want to look at the Manage Spec Limits capability in JMP 14&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Manage Spec Limits(  );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, if you just want to continue the way you are doing it, here is a modification of your script that will set the Show Limits&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = open();
dt2 = Data Table( "limits" );
Current Data Table( dt );
nw = New Window( "Select Process Variables",
	Text Box( "Selection Columns" ),
	H List Box(
		datacolbox = Col List Box( all ),
		Button Box( "Process Variables", pList &amp;lt;&amp;lt; append( datacolbox &amp;lt;&amp;lt; get selected ) ),
		pList = List Box( {} )
	),
	Button Box( "OK",
		thelist = plist &amp;lt;&amp;lt; get items;
		// Loop across all of the item is theList and process
		// the data
		For( i = 1, i &amp;lt;= N Items( theList ), i++,
			theRow = dt2 &amp;lt;&amp;lt; get rows where( :Process == theList[i] );
			If( N Rows( theRow ) &amp;gt; 0, 
				// Change theRow to a scaler
				theRow = theRow[1];
				// Set the spec limits in the dt data table by reading
				// the values from the dt2(limits) data table
				Eval(
					Substitute(
							Expr(
								Column( dt, theList[i] ) &amp;lt;&amp;lt;
								set property(
									"spec limits",
									{__LSL__, __USL__, __Target__, Show Limits( 1 )}
								)
							),
						Expr( __LSL__ ), Column( dt2, "LSL" )[theRow],
						Expr( __USL__ ), Column( dt2, "USL" )[theRow],
						Expr( __Target__ ), Column( dt2, "Target" )[theRow]
					)
				);
			);
		);
		
		nw &amp;lt;&amp;lt; close window;
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 08 Jun 2019 02:40:00 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2019-06-08T02:40:00Z</dc:date>
    <item>
      <title>JSL Turning on Spec Limits "Show as Graph Reference Lines"</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Turning-on-Spec-Limits-quot-Show-as-Graph-Reference-Lines/m-p/212373#M42522</link>
      <description>&lt;P&gt;I have a great script I borrowed from somewhere to import multiple spec limits and assign them to the each column. Is there a way when editing a column's specification to also check the box unders Spec Limits for "Show as Graph Reference Lines"? Right now I have to do this manually.&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="jmp spec limits graph reference lines.png" style="width: 356px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17673iB9F979016C642FD0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jmp spec limits graph reference lines.png" alt="jmp spec limits graph reference lines.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dt2 = Open();
Current Data Table( dt );
nw = New Window( "Select Process Variables",
	Text Box( "Selection Columns" ),
	H List Box(
		datacolbox = Col List Box( all ),
		Button Box( "Process Variables",
			pList &amp;lt;&amp;lt; append( datacolbox &amp;lt;&amp;lt; get selected )
		),
		pList = List Box( {} )
	),
	Button Box( "OK",
		thelist = plist &amp;lt;&amp;lt; get items;
		pvars = ":" || thelist[1];
		For( i = 2, i &amp;lt;= N Items( thelist ), i++,
			pvars = pvars || ",:" || thelist[i]
		);
		Eval(
			Parse(
				"obj = dt &amp;lt;&amp;lt; Process Capability(
	Process Variables(" || pvars ||
				" ),
	Spec Limits( Import Spec Limits( dt2 ) )
);"
			)
		);
		obj &amp;lt;&amp;lt; Save Spec Limits as Column Properties;
		obj &amp;lt;&amp;lt; close window;
		nw &amp;lt;&amp;lt; close window;
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 22:18:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Turning-on-Spec-Limits-quot-Show-as-Graph-Reference-Lines/m-p/212373#M42522</guid>
      <dc:creator>clausa</dc:creator>
      <dc:date>2019-06-07T22:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: JSL Turning on Spec Limits "Show as Graph Reference Lines"</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Turning-on-Spec-Limits-quot-Show-as-Graph-Reference-Lines/m-p/212383#M42523</link>
      <description>&lt;P&gt;If I am interpreting your code properly, what you are doing is copying your limits from the limits table, into the column properties for your data table.&amp;nbsp; If this is the case, you may want to look at the Manage Spec Limits capability in JMP 14&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Manage Spec Limits(  );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, if you just want to continue the way you are doing it, here is a modification of your script that will set the Show Limits&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = open();
dt2 = Data Table( "limits" );
Current Data Table( dt );
nw = New Window( "Select Process Variables",
	Text Box( "Selection Columns" ),
	H List Box(
		datacolbox = Col List Box( all ),
		Button Box( "Process Variables", pList &amp;lt;&amp;lt; append( datacolbox &amp;lt;&amp;lt; get selected ) ),
		pList = List Box( {} )
	),
	Button Box( "OK",
		thelist = plist &amp;lt;&amp;lt; get items;
		// Loop across all of the item is theList and process
		// the data
		For( i = 1, i &amp;lt;= N Items( theList ), i++,
			theRow = dt2 &amp;lt;&amp;lt; get rows where( :Process == theList[i] );
			If( N Rows( theRow ) &amp;gt; 0, 
				// Change theRow to a scaler
				theRow = theRow[1];
				// Set the spec limits in the dt data table by reading
				// the values from the dt2(limits) data table
				Eval(
					Substitute(
							Expr(
								Column( dt, theList[i] ) &amp;lt;&amp;lt;
								set property(
									"spec limits",
									{__LSL__, __USL__, __Target__, Show Limits( 1 )}
								)
							),
						Expr( __LSL__ ), Column( dt2, "LSL" )[theRow],
						Expr( __USL__ ), Column( dt2, "USL" )[theRow],
						Expr( __Target__ ), Column( dt2, "Target" )[theRow]
					)
				);
			);
		);
		
		nw &amp;lt;&amp;lt; close window;
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Jun 2019 02:40:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Turning-on-Spec-Limits-quot-Show-as-Graph-Reference-Lines/m-p/212383#M42523</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-06-08T02:40:00Z</dc:date>
    </item>
  </channel>
</rss>

