Batch file conversion

 From:  Micha
2100.26 In reply to 2100.25 
Sorry, so much questions. I try to send a file to MOI, so that it is shown and the meshing dialog is open. It's like this script, but in the background should be visible the MOI interface for a visible control of the meshing. Is this possible? I found no option to enable the general UI.


function Convert(FileName)
{
var gd = moi.geometryDatabase;

// Open the file, set 2nd param to true to suppress any save changes prompt.
gd.open( FileName, true );

// Create the output file name by breaking off the file extension and adding 'obj'.
OBJFileName = FileName.substr( 0, FileName.lastIndexOf('.') + 1 ) + 'obj';

// Save out to the output file, passing the option to suppress the UI. You
// add other options separated by semi-colons with no spaces. These
// options are available for controlling the meshing:
// NoUI=true
// Angle=12.0
// Output=ngons | quads | triangles
// MaxLength=0.0
// MaxLengthApplyTo=curved | planes | all
// MinLength=0.01
// AspectRatio=0.0
// Weld=true
// Display=shadedwithedges | shadednoedges | wireframe
// ExpandedDialog=false
gd.saveAs( OBJFileName, 'Angle=12.0;MinLength=0.01;MaxLength=1000;AspectRatio=20;Weld=true;Output=quads');

// Let's clear out and suppress any save changes prompt again.
gd.fileNew( true );
}
Convert('d:\\Temp\\moi.3dm');
moi.exit( true ); // Pass true to suppress save changes prompt.