External program using Moi tools/algo/commands

 From:  Michael Gibson
10884.7 In reply to 10884.6 
Hi Defcon, so the parameters need to go into this spot, separated by semicolons:

gd.saveAs( OBJFileName, 'NoUI=true' );

So it should look like this:

code:
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.0
    // AspectRatio=0.0
    // Weld=true
    // Display=shadedwithedges | shadednoedges | wireframe
    // ExpandedDialog=false

    gd.saveAs( OBJFileName, 'NoUI=true;Angle=1.0;Output=ngons;MaxLength=0.0;MaxLengthApplyTo=curved;MinLength=0.0;AspectRatio=0.0;Weld=true' );

    // Let's clear out and suppress any save changes prompt again.
    gd.fileNew( true );
}


Does that get it working how you need?

- Michael