Batch Convert STP to FBX

 From:  Michael Gibson
9695.2 In reply to 9695.1 
Hi ironsightdesign, I think the problem is in your BatchConvert.js file, you've got to move this: ConvertFolder( 'd:\\_convert', 'stp' ); to the bottom, right now it's located inside the ConvertFolder function itself so that's going to be an infinite loop.

So like this:

BatchConvert.js

code:
// This is the script file that you would generate, put one line in
// for each file you want to convert.

#include "Convert.js"

function ConvertFolder( FolderName, FileExtensionToLoad )
{
    // Convert all files within a given folder, that have the given file extension.
    // For example, convert all .3dm files inside of the folder c:\test :
    // ConvertFolder( 'c:\\test', '3dm' );

    // Not right here though!
    //ConvertFolder( 'd:\\_convert', 'stp' );

    var Files = moi.filesystem.getFiles( FolderName, '*.' + FileExtensionToLoad );

    for ( var i = 0; i < Files.length; ++i )
        Convert( Files.item(i) );
}

// Put it here:
ConvertFolder( 'd:\\_convert', 'stp' );




Let me know if you're still stuck. If so maybe post your .js files as a file attachment.

- Michael