Batch file conversion

 From:  Micha
2100.19 In reply to 2100.18 
The problem is still alive if I start the batchconvert.js without Rhino. The batch file should work per double click or? I get the error, that this line dosn't work.

#include "Convert.js"

If the #include dosn't work, could I start a single *.js without a call of an extern code?
Something like this:

function Convert(...here the name of the *.3dm file...)
{
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' );

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

moi.exit( true ); // Pass true to suppress save changes prompt.