<?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: Passing outer variables into Add Graphics Script() in Graph Builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Passing-outer-variables-into-Add-Graphics-Script-in-Graph/m-p/954494#M110038</link>
    <description>&lt;P&gt;You have to evaluate it inside the graphic script. Below is one option using EvalExpr (Substitute is also a good option).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

rpt = Current Report();

cc = 1;

Eval(Eval Expr(
	rpt[Frame Box(1)] &amp;lt;&amp;lt; Add Graphics Script(
		1, 
		Description(""), 
		Text(Center Justified, {0, 0}, Expr(cc))
	)
));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Jun 2026 04:13:22 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2026-06-19T04:13:22Z</dc:date>
    <item>
      <title>Passing outer variables into Add Graphics Script() in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Passing-outer-variables-into-Add-Graphics-Script-in-Graph/m-p/954481#M110037</link>
      <description>&lt;P&gt;I am encountering an issue while programming in JMP's JSL language. When I use the `Add Graphics Script()` function to customize a Graph Builder, outer-scope variables are not passed to the script as values at the time of addition, which leads to errors. I have tried using the `Eval()` function to convert variables into their values, but `Add Graphics Script()` passes the `Eval()` call itself into the Graph Builder, and the error persists. Is there a proper way to inject the current values of external variables into the script so that they are evaluated correctly within the Graph Builder context?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
rpt = Current Report();
cc = 1;
rpt[Frame Box( 1 )] &amp;lt;&amp;lt; Add Graphics Script(
	1,
	Description( "" ),
	Text( Center Justified, {0, 0}, cc )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AggregateHare95_0-1781837815928.png"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/106961iDBB18BC6F2B967F3/image-size/medium?v=v2&amp;amp;px=400" alt="AggregateHare95_0-1781837815928.png" title="AggregateHare95_0-1781837815928.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Name Unresolved: cc in access or evaluation of 'cc' , cc/*###*/&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2026 02:59:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Passing-outer-variables-into-Add-Graphics-Script-in-Graph/m-p/954481#M110037</guid>
      <dc:creator>AggregateHare95</dc:creator>
      <dc:date>2026-06-19T02:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Passing outer variables into Add Graphics Script() in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Passing-outer-variables-into-Add-Graphics-Script-in-Graph/m-p/954494#M110038</link>
      <description>&lt;P&gt;You have to evaluate it inside the graphic script. Below is one option using EvalExpr (Substitute is also a good option).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

rpt = Current Report();

cc = 1;

Eval(Eval Expr(
	rpt[Frame Box(1)] &amp;lt;&amp;lt; Add Graphics Script(
		1, 
		Description(""), 
		Text(Center Justified, {0, 0}, Expr(cc))
	)
));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jun 2026 04:13:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Passing-outer-variables-into-Add-Graphics-Script-in-Graph/m-p/954494#M110038</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-06-19T04:13:22Z</dc:date>
    </item>
  </channel>
</rss>

