Execute SimSolid Functions using a JavaScript File (Supplement of Online Help)


From release note:

You can now run SimSolid in batch mode using a JavaScript file. This capability is only available for the full version of SimSolid. With this mode, you can run various operations by executing a JavaScript file through command line arguments. The JavaScript file can also be parameterized and executed using command line arguments. Modal analysis with regular connections is currently supported. Applying boundary conditions is not currently supported.


The procedure:


1. Put three files below in the same folder (sample.zip has these)

image

2. Launch command prompt and change directory to the folder made in 1 with cd command

3. Execute the following command:

start /wait "C:\Program Files\SimSolid\2021\SimSolid2021\Simsolid.exe" -s modal.js -l log.txt

*if this does not work, please try to remove start /wait as below:

"C:\Program Files\SimSolid\2021\SimSolid2021\Simsolid.exe" -s modal.js -l log.txt

4. ssp and unv are generated in the same folder

image

This modal.js has the same contents as modal.js in the install folder below:

C:\Program Files\SimSolid\2021\SimSolid2021\Examples\Batch mode

The below is edited:

-set geometry file (plate100x50x1_01.x_t)

var study = Project.addDesignStudy({
file: 'plate100x50x1_01.x_t',
reader: 'parasolid',
resolution: 'custom',
angularDev: 12,
chordalDev: 0.5,
units: { length: 'mm', angle: 'deg' } });

-set  datum.csv, mode.unv, and ssp (plate100x50x1_01.ssp)

if (analysis.solve())
{
// import datum points
var datumPointSet = study.addDatumPointSet({
file: 'datum.csv',
units: {length: 'mm'} });

// export results to UNV
analysis.exportToUNV({
file: 'mode.unv',
datumPointSet: datumPointSet });

Project.save({ file: 'plate100x50x1_01.ssp' });
}

You can show MAC with unv and the OptiStruct's H3D by using HyperView.