cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
MathStatChem
Level VI

Add a Script to Data Table at a Specific Order with JSL

You can use JSL to add a script to a data table using the "Add Properties to Table()" or "Add Scripts to Table()" message.  By default, this appends the added script to end of the list of scripts (at the bottom in the table properties pane). 

 

Is there a way to put the script at a specific order location in the list of saved scripts?  For example, adding the script so it as at the top of the list of scripts saved to the table.  

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Add a Script to Data Table at a Specific Order with JSL

I think that you can add the new script. It will be appended to the bottom of the list of table scripts. Then you can select it and move it where you want it to be.

 

Names Default To Here( 1 );

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

script name = dt << Get Table Script Names;

dt << New Script( "Bivariate Orhtogonal Fit",
	Bivariate(
		Y( :weight ),
		X( :height ),
		Fit Orthogonal( 1 )
	)	
);

dt << Move Selected Scripts(
	{ "Bivariate Orhtogonal Fit" },
	After( "Bivariate" )
);

View solution in original post

1 REPLY 1

Re: Add a Script to Data Table at a Specific Order with JSL

I think that you can add the new script. It will be appended to the bottom of the list of table scripts. Then you can select it and move it where you want it to be.

 

Names Default To Here( 1 );

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

script name = dt << Get Table Script Names;

dt << New Script( "Bivariate Orhtogonal Fit",
	Bivariate(
		Y( :weight ),
		X( :height ),
		Fit Orthogonal( 1 )
	)	
);

dt << Move Selected Scripts(
	{ "Bivariate Orhtogonal Fit" },
	After( "Bivariate" )
);