Subscribe Bookmark RSS Feed

How to obtain the Platform Script from a report window?

Hi,

I'm trying to read in the platform script from an open graph/analysis window. Using "window_ref = Window( i );" I can obtain a reference to that window, but I'm not sure how to obtain the platform object from this report window referece in order to get the platform script rather than the report window script.  Can anyone help with this?

Thanks,

Deepak G

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

Solution

Use the Get Scriptable Object message on an outline box.

open("$SAMPLE_DATA\Big Class.jmp");
Bivariate( Y( :weight ), X( :height ), Fit Line );
biv=Current Report()[outlinebox(1)]<<Get Scriptable Object; 
biv<<fit mean;
-Jeff
3 REPLIES
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

Solution

Use the Get Scriptable Object message on an outline box.

open("$SAMPLE_DATA\Big Class.jmp");
Bivariate( Y( :weight ), X( :height ), Fit Line );
biv=Current Report()[outlinebox(1)]<<Get Scriptable Object; 
biv<<fit mean;
-Jeff

Thanks Jeff

Vball247

Occasional Contributor

Joined:

Nov 1, 2016

Thanks for this answer. I was trying to use Send To Report(Dispatch...) to update a manually generated platform. So it appears the Send To Report is a message to the platform, to then send to the report of the platform the Dispatch contents. I was looking for a "Current Platform" option similar to the "Current Report". So it seems that

 

myplatform = Current Platform() (that does not exist) can be done by:

 

myplatform = Current Report()[outlinebox(1)]<<Get Scriptable Object;

 

Now something like this works:

myplat = Current Report()[Outlinebox(1)] << Get Scriptable Object;


myplat << SendToReport( 
	Dispatch(
		{},
		"1",
		ScaleBox,
		{Add Ref Line( 60, "Solid", "Medium Dark Red", "Point of interest", 1 )}
	)
);

 

Any chance in new versions of JMP of getting a "Current Platform" function that would be equivalent to this method using Get Scriptable Object?