<?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: Script to control the Profiler in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Script-to-control-the-Profiler/m-p/285691#M55136</link>
    <description>&lt;P&gt;I do not see a way to send messages to the Prediction Profiler that is embedded in any fitting platform. The only messages I found are the ones that open or close it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fit &amp;lt;&amp;lt; Profiler( 1 );

fit &amp;lt;&amp;lt; Profiler( 0 );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maybe someone else knows how to send messages to the embedded object that accomplish the same tasks as the commands in the red triangle menu.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you have to include the necessary arguments to the message that opens the profiler to get what you want. Here is an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

launch = dt &amp;lt;&amp;lt; Fit Model(
	Y( :weight ),
	Effects( :age, :sex, :height ),
	Personality( "Standard Least Squares" ),
	Emphasis( "Minimal Report" )
);

fit = launch &amp;lt;&amp;lt; Run;

fit &amp;lt;&amp;lt; Profiler( 1,
	Confidence Intervals( 1 ),
	Desirability Functions( 1 ),
	Term Value(
		age( 12, Lock( 0 ), Show( 1 ) ),
		sex( "F", Lock( 0 ), Show( 1 ) ),
		height( 62.55, Lock( 0 ), Show( 1 ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 13 Aug 2020 10:04:07 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2020-08-13T10:04:07Z</dc:date>
    <item>
      <title>Script to control the Profiler</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-control-the-Profiler/m-p/285657#M55130</link>
      <description>&lt;P&gt;I like adding buttons to my toolbar that run scripts that execute actions of common tasks I do vs having to dive multiple layers into an option menu.&amp;nbsp; My most recent goal is to add some buttons that would control steps i take in the profiler.&amp;nbsp; Specifically I'd like to click a button to have the profiler maximize desirability, one for set the profiler to a row, and one to save current profiler settings.&amp;nbsp; However, I couldn't find any syntax in the scripting library to work from.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for exact details on what I'm trying to accomplish this is a description for the Max desirability button:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Run an analysis 2. Create a prediction profiler 3.&amp;nbsp; Pred Pro red arrow-&amp;gt; add desirability 4. Adjust desirability 5. **Click button on toolbar with my macro to maximize desirability**&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any ideas!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:34:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-control-the-Profiler/m-p/285657#M55130</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2023-06-09T23:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Script to control the Profiler</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-control-the-Profiler/m-p/285691#M55136</link>
      <description>&lt;P&gt;I do not see a way to send messages to the Prediction Profiler that is embedded in any fitting platform. The only messages I found are the ones that open or close it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fit &amp;lt;&amp;lt; Profiler( 1 );

fit &amp;lt;&amp;lt; Profiler( 0 );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maybe someone else knows how to send messages to the embedded object that accomplish the same tasks as the commands in the red triangle menu.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you have to include the necessary arguments to the message that opens the profiler to get what you want. Here is an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

launch = dt &amp;lt;&amp;lt; Fit Model(
	Y( :weight ),
	Effects( :age, :sex, :height ),
	Personality( "Standard Least Squares" ),
	Emphasis( "Minimal Report" )
);

fit = launch &amp;lt;&amp;lt; Run;

fit &amp;lt;&amp;lt; Profiler( 1,
	Confidence Intervals( 1 ),
	Desirability Functions( 1 ),
	Term Value(
		age( 12, Lock( 0 ), Show( 1 ) ),
		sex( "F", Lock( 0 ), Show( 1 ) ),
		height( 62.55, Lock( 0 ), Show( 1 ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Aug 2020 10:04:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-control-the-Profiler/m-p/285691#M55136</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-08-13T10:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Script to control the Profiler</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-control-the-Profiler/m-p/285735#M55146</link>
      <description>&lt;P&gt;This will get a reference to the profiler&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pf = report(fit)["Prediction Profiler"] &amp;lt;&amp;lt; get scriptable object;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you can send messages to the profiler, e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pf &amp;lt;&amp;lt; Maximize Desirability;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Aug 2020 14:50:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-control-the-Profiler/m-p/285735#M55146</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2020-08-13T14:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Script to control the Profiler</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-control-the-Profiler/m-p/306111#M56172</link>
      <description>&lt;P&gt;Thanks for all the help!&amp;nbsp; Between these suggestions and this help from Jordan Hiller:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;EM&gt;Yes, you can get a reference to an already-open analysis. For example, this script will add a Press report to an open Fit Model:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Names Default To Here( 1 );&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//Get ref to fit least squares object&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;fm = Current Report()[Outline Box( 1 )] &amp;lt;&amp;lt; Get Scriptable Object;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//show press report&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;fm &amp;lt;&amp;lt; Press( 1 );&lt;/EM&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this script which works great, is now in my toolbar and&amp;nbsp; saving me clicks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt=current data table();

pf = Current Report()["Prediction Profiler"] &amp;lt;&amp;lt; get scriptable object;

pf &amp;lt;&amp;lt; Maximize Desirability;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 13 Sep 2020 20:54:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-control-the-Profiler/m-p/306111#M56172</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2020-09-13T20:54:08Z</dc:date>
    </item>
  </channel>
</rss>

