<?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: Save a JMP Custom Design to a csv file in a script? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Save-a-JMP-Custom-Design-to-a-csv-file-in-a-script/m-p/53092#M30047</link>
    <description>&lt;P&gt;I think the approach to externalize the "Make Table" message, and placing a handle on it's result is the easiest way to do this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;DOEPlatform = DOE(
    Custom Design,
    {Add Response( None, "My Response", ., ., . ),
    Add Factor( Discrete Numeric, {1, 2, 3, 4, 5, 6, 7, 8, 9}, "f1", 0 ),
    Add Factor( Discrete Numeric, {1, 2, 3, 4, 5}, "f2", 0 ),
    Add Factor( Blocking, 7, "day" ),
    Add Factor( Categorical, {"v1", "v2", "v3", "v3"}, "f3", 0 ),
    Set Random Seed( 123 ),
    Add Term( {1, 0} ),
    Add Term( {1, 1} ),
    Add Term( {2, 1} ),
    Add Term( {1, 1} ),
    Add Term( {2, 1} ),
    Add Term( {4, 1} ),
    Add Alias Term( {1, 2} ),
    Add Alias Term( {2, 2} ),
    Add Alias Term( {1, 1}, {2, 1} ),
    Add Alias Term( {1, 2} ),
    Add Alias Term( {2, 2} ),
    Add Alias Term( {1, 1}, {2, 1} ),
    Add Alias Term( {1, 1}, {4, 1} ),
    Add Alias Term( {4, 1}, {2, 1} ),
    Number of Starts( 581 ),
    Replicates( 3 ),
    Set Sample Size( 28 ),
    Optimality Criterion( 3 ),
    Make Design}
);

dt = DOEPlatform&amp;lt;&amp;lt;make table;
dt &amp;lt;&amp;lt; Save As(".........");&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Mar 2018 21:48:03 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-03-13T21:48:03Z</dc:date>
    <item>
      <title>Save a JMP Custom Design to a csv file in a script?</title>
      <link>https://community.jmp.com/t5/Discussions/Save-a-JMP-Custom-Design-to-a-csv-file-in-a-script/m-p/53089#M30044</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a script that generates a Custom Design then outputs the Design Matrix to a text file, e.g., '*.csv'.&amp;nbsp; Here is an example script that generates the Custom Design and a JMP Table containing the Design Matrix.&lt;/P&gt;&lt;PRE&gt;DOE(
    Custom Design,
    {Add Response( None, "My Response", ., ., . ),
    Add Factor( Discrete Numeric, {1, 2, 3, 4, 5, 6, 7, 8, 9}, "f1", 0 ),
    Add Factor( Discrete Numeric, {1, 2, 3, 4, 5}, "f2", 0 ),
    Add Factor( Blocking, 7, "day" ),
    Add Factor( Categorical, {"v1", "v2", "v3", "v3"}, "f3", 0 ),
    Set Random Seed( 123 ),
    Add Term( {1, 0} ),
    Add Term( {1, 1} ),
    Add Term( {2, 1} ),
    Add Term( {1, 1} ),
    Add Term( {2, 1} ),
    Add Term( {4, 1} ),
    Add Alias Term( {1, 2} ),
    Add Alias Term( {2, 2} ),
    Add Alias Term( {1, 1}, {2, 1} ),
    Add Alias Term( {1, 2} ),
    Add Alias Term( {2, 2} ),
    Add Alias Term( {1, 1}, {2, 1} ),
    Add Alias Term( {1, 1}, {4, 1} ),
    Add Alias Term( {4, 1}, {2, 1} ),
    Number of Starts( 581 ),
    Replicates( 3 ),
    Set Sample Size( 28 ),
    Optimality Criterion( 3 ),
    Make Design,
    Make Table}
);&lt;/PRE&gt;&lt;P&gt;I searched the JMP JSL Scripting guide without finding a solution.&amp;nbsp; In the Scripting Index, the "Data Table &amp;gt; Save,Save As" entry looks promising.&amp;nbsp; It has a example that says:&lt;/P&gt;&lt;PRE&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; Save( "C:\Big Class.csv" );&lt;/PRE&gt;&lt;P&gt;I am not sure how to apply this.&amp;nbsp; After running the DOE script, the table is already open.&amp;nbsp; How do I get the handle for that table (`dt` in the examlpe) so I can then save it using `dt &amp;lt;&amp;lt; Save( "C:\my\path\file.csv" )`?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:24:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-a-JMP-Custom-Design-to-a-csv-file-in-a-script/m-p/53089#M30044</guid>
      <dc:creator>StevenCHowell</dc:creator>
      <dc:date>2023-06-09T23:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Save a JMP Custom Design to a csv file in a script?</title>
      <link>https://community.jmp.com/t5/Discussions/Save-a-JMP-Custom-Design-to-a-csv-file-in-a-script/m-p/53092#M30047</link>
      <description>&lt;P&gt;I think the approach to externalize the "Make Table" message, and placing a handle on it's result is the easiest way to do this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;DOEPlatform = DOE(
    Custom Design,
    {Add Response( None, "My Response", ., ., . ),
    Add Factor( Discrete Numeric, {1, 2, 3, 4, 5, 6, 7, 8, 9}, "f1", 0 ),
    Add Factor( Discrete Numeric, {1, 2, 3, 4, 5}, "f2", 0 ),
    Add Factor( Blocking, 7, "day" ),
    Add Factor( Categorical, {"v1", "v2", "v3", "v3"}, "f3", 0 ),
    Set Random Seed( 123 ),
    Add Term( {1, 0} ),
    Add Term( {1, 1} ),
    Add Term( {2, 1} ),
    Add Term( {1, 1} ),
    Add Term( {2, 1} ),
    Add Term( {4, 1} ),
    Add Alias Term( {1, 2} ),
    Add Alias Term( {2, 2} ),
    Add Alias Term( {1, 1}, {2, 1} ),
    Add Alias Term( {1, 2} ),
    Add Alias Term( {2, 2} ),
    Add Alias Term( {1, 1}, {2, 1} ),
    Add Alias Term( {1, 1}, {4, 1} ),
    Add Alias Term( {4, 1}, {2, 1} ),
    Number of Starts( 581 ),
    Replicates( 3 ),
    Set Sample Size( 28 ),
    Optimality Criterion( 3 ),
    Make Design}
);

dt = DOEPlatform&amp;lt;&amp;lt;make table;
dt &amp;lt;&amp;lt; Save As(".........");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Mar 2018 21:48:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-a-JMP-Custom-Design-to-a-csv-file-in-a-script/m-p/53092#M30047</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-03-13T21:48:03Z</dc:date>
    </item>
  </channel>
</rss>

