BookmarkSubscribe
Choose Language Hide Translation Bar
terapin
Community Trekker

Reformat Script Command Wrapping Long Rows of JSL Commands

When I write JSL code I often have long rows of  JSL commands.  I like the long rows since it makes it easier to read/organize the code I've written and my large monitor can handle this display.  I have Wrap Text disabled in preferences, but when I invoke the Reformat Script command (Edit | Reformat Script) many of my longer rows are wrapped and now have permanent hard returns in them.  I would like the Reformat Script command to leave these long rows alone and just reformat for indentation.  Is there a setting in Preferences that I'm missing that will keep these long rows as is and not put in one or more hard returns? I've included an example of my code as preferred and with the Reformat Script hard returns inserted.

Example of code with all commands on same row

	Column( "TIMESTAMP" ) << Set Name( "Date & Time" );
	Column( "Date & Time" ) << Data Type( "Numeric", Format( "m/d/y h:m" ) );

	Try( Column( "RECORD" ) << Set Name( "Record #" ) );
	Try( Column( "Prog_ID" ) << Set Name( "Program ID" ) << Format( "Fixed Dec", 3 ) );
	Try( Column( "Sys_Amp_hr_Tot" ) << Set Name( "Current Usage by Total System (Amp_Hr/Day)" ) << Format( "Fixed Dec", 3 ) << Set Display Width( 83 ) );
	Try(	Column( "Load_Amp_hr_Tot" ) << Set Name( "Current Usage by Datalogger (Amp_Hr/Day)" ) << Format( "Fixed Dec", 3 ) << Set Display Width( 80 ) );
	Try( Column( "Batt_Amp_hr_Tot" ) << Set Name( "Current Entering Battery (Amp_Hr/Day)" ) << Format( "Fixed Dec", 3 ) << Set Display Width( 73 ) );
	Try( Column( "IBatt_Amp_hr_Tot" ) << Set Name( "Current Entering/Exiting Battery (Amp_Hr/Day)" ) << Format( "Fixed Dec", 3 ) << Set Display Width( 73 ) );
	Try(	Column( "I_In_Chg_Amp_hr_Tot" ) << Set Name( "Current Entering Charger (Amp_Hr/Day)" ) << Format( "Fixed Dec", 3 ) << Set Display Width( 73 ) );
	Try( Column( "V_in_chg_Avg" ) << Set Name( "Charger Voltage - Avg (V)" ) << Format( "Fixed Dec", 1 ) << Set Display Width( 59 ) );
	Try( Column( "VBatt_Avg" ) << Set Name( "Battery Voltage - Avg (V)" ) << Format( "Fixed Dec", 1 ) << Set Display Width( 59 ) );

	Try( Column( "Counts_Charge_State_None_Tot" ) << Set Name( "Charge State - None (Obs/Day)" ) << Format( "Fixed Dec", 0 ) << Set Display Width( 60 ) );
	Try(	Column( "Counts_Charge_State_Current_Ltd_Tot" ) << Set Name( "Charge State - Current Ltd (Obs/Day)" ) << Format( "Fixed Dec", 0 ) << Set Display Width( 60 ) );
	Try(	Column( "Counts_Charge_State_Cyclic_Tot" ) << Set Name( "Charge State - Cyclic (Obs/Day)" ) << Format( "Fixed Dec", 0 ) << Set Display Width( 60 ) );
	Try( Column( "Counts_Charge_State_Float_Tot" ) << Set Name( "Charge State - Float (Obs/Day)" ) << Format( "Fixed Dec", 0 ) << Set Display Width( 60 ) );
	Try( Column( "Counts_Charge_State_Battery_Test_Tot" ) << Set Name( "Charge State - Battery Test (Obs/Day)" ) << Format( "Fixed Dec", 0 ) << Set Display Width( 60 ) );
	Try( Column( "Counts_Charge_Source_None_Tot" ) << Set Name( "Charge Source - None (Obs/Day)" ) << Format( "Fixed Dec", 0 ) << Set Display Width( 56 ) );
	Try( Column( "Counts_Charge_Source_Solar_Tot" ) << Set Name( "Charge Source - Solar (Obs/Day)" ) << Format( "Fixed Dec", 0 ) << Set Display Width( 56 ) );
	Try( Column( "Counts_Charge_Source_Continuous_Tot" ) << Set Name( "Charge Source - Continuous (Obs/Day)" ) << Format( "Fixed Dec", 0 ) << Set Display Width( 75 ) );
	Try( Column( "Qloss" ) << Set Name( "Qloss (Amp_Hr/Day)" ) << Format( "Fixed Dec", 1 ) << Set Display Width( 67 ) );

	Try( :Name( "Power Usage by Total System (W/Day)" ) << Set Display Width( 65 ) );
	Try( :Name( "Power Usage by Datalogger (W/Day)" ) << Set Display Width( 73 ) );
	Try( :Name( "Power Usage by Battery (W/Day)" ) << Set Display Width( 65 ) );
	Try( :Name( "Power Usage by CH200 (W/Day)" ) << Set Display Width( 65 ) );


********************************
Example of code after running Edit | Reformat Script.
	Column( "TIMESTAMP" ) << Set Name( "Date & Time" );
	Column( "Date & Time" ) << Data Type( "Numeric", Format( "m/d/y h:m" ) );

	Try( Column( "RECORD" ) << Set Name( "Record #" ) );
	Try( Column( "Prog_ID" ) << Set Name( "Program ID" ) << Format( "Fixed Dec", 3 ) );
	Try(
		Column( "Sys_Amp_hr_Tot" ) << Set Name( "Current Usage by Total System (Amp_Hr/Day)" ) << Format( "Fixed Dec", 3 ) <<
		Set Display Width( 83 )
	);
	Try(
		Column( "Load_Amp_hr_Tot" ) << Set Name( "Current Usage by Datalogger (Amp_Hr/Day)" ) << Format( "Fixed Dec", 3 ) <<
		Set Display Width( 80 )
	);
	Try( Column( "Batt_Amp_hr_Tot" ) << Set Name( "Current Entering Battery (Amp_Hr/Day)" ) << Format( "Fixed Dec", 3 ) << Set Display Width( 73 ) );
	Try(
		Column( "IBatt_Amp_hr_Tot" ) << Set Name( "Current Entering/Exiting Battery (Amp_Hr/Day)" ) << Format( "Fixed Dec", 3 ) <<
		Set Display Width( 73 )
	);
	Try(
		Column( "I_In_Chg_Amp_hr_Tot" ) << Set Name( "Current Entering Charger (Amp_Hr/Day)" ) << Format( "Fixed Dec", 3 ) <<
		Set Display Width( 73 )
	);
	Try( Column( "V_in_chg_Avg" ) << Set Name( "Charger Voltage - Avg (V)" ) << Format( "Fixed Dec", 1 ) << Set Display Width( 59 ) );
	Try( Column( "VBatt_Avg" ) << Set Name( "Battery Voltage - Avg (V)" ) << Format( "Fixed Dec", 1 ) << Set Display Width( 59 ) );

	Try(
		Column( "Counts_Charge_State_None_Tot" ) << Set Name( "Charge State - None (Obs/Day)" ) << Format( "Fixed Dec", 0 ) <<
		Set Display Width( 60 )
	);
	Try(
		Column( "Counts_Charge_State_Current_Ltd_Tot" ) << Set Name( "Charge State - Current Ltd (Obs/Day)" ) << Format( "Fixed Dec", 0 ) <<
		Set Display Width( 60 )
	);
	Try(
		Column( "Counts_Charge_State_Cyclic_Tot" ) << Set Name( "Charge State - Cyclic (Obs/Day)" ) << Format( "Fixed Dec", 0 ) <<
		Set Display Width( 60 )
	);
	Try(
		Column( "Counts_Charge_State_Float_Tot" ) << Set Name( "Charge State - Float (Obs/Day)" ) << Format( "Fixed Dec", 0 ) <<
		Set Display Width( 60 )
	);
	Try(
		Column( "Counts_Charge_State_Battery_Test_Tot" ) << Set Name( "Charge State - Battery Test (Obs/Day)" ) << Format( "Fixed Dec", 0 ) <<
		Set Display Width( 60 )
	);
	Try(
		Column( "Counts_Charge_Source_None_Tot" ) << Set Name( "Charge Source - None (Obs/Day)" ) << Format( "Fixed Dec", 0 ) <<
		Set Display Width( 56 )
	);
	Try(
		Column( "Counts_Charge_Source_Solar_Tot" ) << Set Name( "Charge Source - Solar (Obs/Day)" ) << Format( "Fixed Dec", 0 ) <<
		Set Display Width( 56 )
	);
	Try(
		Column( "Counts_Charge_Source_Continuous_Tot" ) << Set Name( "Charge Source - Continuous (Obs/Day)" ) << Format( "Fixed Dec", 0 ) <<
		Set Display Width( 75 )
	);
	Try( Column( "Qloss" ) << Set Name( "Qloss (Amp_Hr/Day)" ) << Format( "Fixed Dec", 1 ) << Set Display Width( 67 ) );

	Try( :Name( "Power Usage by Total System (W/Day)" ) << Set Display Width( 65 ) );
	Try( :Name( "Power Usage by Datalogger (W/Day)" ) << Set Display Width( 73 ) );
	Try( :Name( "Power Usage by Battery (W/Day)" ) << Set Display Width( 65 ) );
	Try( :Name( "Power Usage by CH200 (W/Day)" ) << Set Display Width( 65 ) );

 

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
terapin
Community Trekker

Re: Reformat Script Command Wrapping Long Rows of JSL Commands

That's too bad.  Thanks for letting me know.  I'll put in a feature request to JMP support.

0 Kudos
2 REPLIES 2
cwillden
Super User

Re: Reformat Script Command Wrapping Long Rows of JSL Commands

No, there is not

-- Cameron Willden
0 Kudos
terapin
Community Trekker

Re: Reformat Script Command Wrapping Long Rows of JSL Commands

That's too bad.  Thanks for letting me know.  I'll put in a feature request to JMP support.

0 Kudos