Convert File Path
Convert File Path using Run Script
Summary: Creates and saves two reports, a Discriminant analysis report and a Scatterplot 3D report, in a new web report and saves it to a temporary folder.
Code:
dt = Open("data_table.jmp");
rpt1 = dt << Run Script( "Discriminant" );
rpt2 = dt << Run Script( "Scatterplot 3D" );
webrpt = New Web Report();
webrpt << Title( "Baseline Save Folder with Two Reports" );
webrpt << Add Reports( {rpt1, rpt2} );
rptPath = webrpt << Save( "$TEMP", Publish Data( 0 ) );
If(
Host is( "Windows" ), folderPath = Substr( rptPath, 1, Length( Convert File Path( "$TEMP" ) ) + 35 ),
Host is( "Mac" ), folderPath = Substr( rptPath, 1, Length( Convert File Path( "$TEMP" ) ) + 36 )
);
Delete Directory( folderPath );
Code Explanation:
- Open data table;
- Run Discriminant analysis.
- Run Scatterplot 3D.
- Create new web report.
- Set report title.
- Add analysis reports to web report.
- Save web report to temp folder.
- Check host operating system.
- Extract folder path based on OS.
- Delete created folder.