maxscript3ds

MaxScript create a a lot of files


The script creates a lot of files in a loop After starting the 3D max script can only create 499 files. Then displays the error "Runtime Error". Can I change this limit?


Solution

  • One way to solve it, is to create the files first by using the dos command feature. For example:

    HiddenDosCommand "mkdir c:\\NewDir\\"
    HiddenDosCommand "type NUL > c:\\NewDir\\EmptyFile.txt"
    

    will create a new folder and a new empty file in that folder, you can then store the path to this file in a array.

    Then in your loop you point to the path through the array of file paths, and insert your data into each file.