Subscribe Bookmark RSS Feed

I recently upgraded to JMP 12 and my JMP 10.0.2 scripts get the error: Send Expects Scriptable Object in access or evaluation of 'Send' , dt << /*###*/save(. How do I fix this?

caroljackson

Community Trekker

Joined:

Jun 19, 2015

I recently upgraded to JMP 12 and my JMP 10.0.2 scripts get the error: Send Expects Scriptable Object in access or evaluation of 'Send' , dt <<  /*###*/save(.  How do I fix this?  Specific section of the script is:

"W:\OPS\Process Engineers\Metrics\JMP Scripts\JMP Scripts-Chambers\Build and Reclaim\131037 Build Data Split.jmp"

6 REPLIES
caroljackson

Community Trekker

Joined:

Jun 19, 2015

dt = Current Data Table() << set name( "131037 Build Data Split" );

dt <<  /*###*/save(

"W:\OPS\Process Engineers\Metrics\JMP Scripts\JMP Scripts-Chambers\Build and Reclaim\131037 Build Data Split.jmp"

) /*###*/;

txnelson

Super User

Joined:

Jun 22, 2012

can you add the line:

     show(dt);

after your line:

     dt = Current Data table() << ..........

My guess is that you do not have a data table open, or the data table that JMP thinks is the current data table has been closed.

Jim
pmroz

Super User

Joined:

Jun 23, 2011

Try separating the assignment of dt and set name:

dt = Current Data Table();

dt << set name( "131037 Build Data Split" );

dt << save(

"W:\OPS\Process Engineers\Metrics\JMP Scripts\JMP Scripts-Chambers\Build and Reclaim\131037 Build Data Split.jmp"

);

Craige_Hales

Staff

Joined:

Mar 21, 2013

Looks like the right answer to me.

Previously <<setname did not return a value, so the << operator returned the scriptable object (data table) for the assignment.  <<setname was changed to return the actual name assigned to the table, which might have a numeric suffix added to the name you requested if another table of the same name is open.

PMroz ​suggestion to use two steps will make dt hold the data table, then change the name and ignore the returned value.  Without doing that, dt winds up holding the character string name of the data table.  Character strings and numbers are not scriptable objects that take messages, but data tables are.

Sorry for the inconvenience - Craige

Craige
rijking

Community Trekker

Joined:

Apr 18, 2016

@Craige_Hales I have a similar problem having recently upgraded from JMP 10 to JMP 13. The 

following is deployed multiple times in a script to compress selected columns.

pp=dt<<Get Column Names(); ncols = N Items(pp); for(k=1,k<=ncols,k++, pp[k]<<Set Selected(1););
dt << Compress Selected Columns();

This works fine in JMP 10 but with JMP 13 and I am getting the following error:

Send Expects Scriptable Object{1} in access or evaluation of 'Send' , pp[k] <<  /*###*/Set Selected( 1 ) /*###*/

 I can see from the above I need to separate this into two steps, but can't quite work out the syntax - are you able to help please? Many thanks

Craige_Hales

Staff

Joined:

Mar 21, 2013

Your script looks OK in JMP 10,11,12,13, I think something else has changed. Maybe add show(pp); and check the log to see what's going on.  pp[k] is a column (all 5 times) when I run it with Big Class.jmp for the dt.

Craige