cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
JohnAvina
Level I

Send Expects Scriptable Object in access or evaluation of 'Send' , obj << /*###*/Journal << /*###*/Close Window/*###*/

Here is some code that throws this error.  Why is it happening?  I don't have a clue.

 

//Fan Statuses vs. Occupancy graphs
For( j = 1, j <= N Items( var ), j++, //Outer loop to cycle within list of variables

	v1 = Char( "Time " || var[j] || "_FanStatus" );
	v2 = Char( var[j] || "_FanStatus" );

	obj = Graph Builder(
		Size( 1400, 800 ),
		Variables(
			X( Column( v1 ) ),
			X( :Time Final, Position( 1 ) ),
			Y( Column( v2 ) ),
			Color( :Occupancy )
		),
		Elements(
			Line( X( 1 ), Y, Color( 0 ), Legend( 2 ), Connection( "Step" ) ),
			Heatmap( X( 2 ), Legend( 3 ) )
		),
		SendToReport(
			Dispatch( {"Line"}, "", OutlineBox, {Close( 0 )} ),
			Dispatch( {"Heatmap"}, "", OutlineBox, {Close( 0 )} ),
			Dispatch(
				{},
				v1,
				ScaleBox,
				{Min( :Time Final[1] ), Max( :Time Final[N Rows( :Time Final )] ), Interval( "Minute" ),
				Inc( 15 ), Minor Ticks( 0 ), Label Row( Label Orientation( "Angled" ) )}
			),
			Dispatch(
				{},
				"400",
				ScaleBox,
				{Legend Model(
					3,
					Properties( 0, {Transparency( 0.5 )}, Item ID( "Occupied", 1 ) ),
					Properties( 1, {Fill Color( 4 ), Transparency( 0.5 )}, Item ID( "OptStart", 1 ) ),
					Properties( 2, {Fill Color( 2 ), Transparency( 0 )}, Item ID( "Unoccupied", 1 ) )
				)}
			),
			Dispatch( {}, "graph title", TextEditBox, {Set Text( "Raney " || v2 || " vs. Occ" )} )
		)
	);
	obj << Journal << Close Window;
);
2 REPLIES 2
Thierry_S
Super User

Re: Send Expects Scriptable Object in access or evaluation of 'Send' , obj << /*###*/Journal << /*###*/Close Window/*###*/

Hi,

 

The object "GraphBuilder" cannot be sent to a Journal. You need to retrieve the Report: report (obj) << Journal;

Also, it is unclear whether you are trying to close the Journal or close the Obj with the last statement of your script. I recommend separating these two steps.

 

Best,

TS

Thierry R. Sornasse

Re: Send Expects Scriptable Object in access or evaluation of 'Send' , obj << /*###*/Journal << /*###*/Close Window/*###*/

I do not see this issue with this simple example of the steps in your process:

 

Names Default to Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

obj = dt << Graph Builder(
	Size( 534, 456 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables( X( :height ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
);

obj << Journal;

obj << Close Window;

Recommended Articles