35.24. Batchconvert.exe (9.04, 9.03)

With this program you can convert 3D files and create preview images in batch mode.

You can use "Scheduled tasks" in Windows. (Hereto no GUI is needed; ActiveX is possible!)

(When you call up batchconvert.exe without parameter or with '--help' or with '-?', then the help with all possible parameters is displayed.

The file batchconvert.exe is found under:

C:\Program Files (x86)\cadenas\partsolutions\software\bin\x86\32\batchconvert.exe"

Call up happens in the following form:

batchconvert sourceDirName
                [--targetdir targetDirName]
                [--logfile logFileName]
                [--errorfile errorFileName]
                [--inputformats format1 format2 format3 ...]
                [--outputformats format3d formatImage]
                [--recursive]
                [--meshreduction]
                [--debug]
                [--imagewidth]
                [--imageheight]

[Note]Note

sourceDirName

As of version PSOL 9.04 there is an alternative possibility to declare the source directory:

Now instead of a directory you can specify a text file. Each line in this file has to specify the absolute path to a file to be imported. For the rest nothing has changed at call up.

Exemplary initial situation:

C://abc/def/file1.prt
C://abc/ghj/file2.prt
C://xyz/stu/file3.prt

Detection of target path:

In order for the structure of source files to be mapped correctly at the target, the target path is detected as follows:

At first the directory with the deepest path with the characteristic that it contains all files from the list is determined .

Then this common path is replaced by the specified target path.

Focusing on the first two lines the deepest common path would be "../abc" and focusing on all three lines it would be "C://".

C://target

Result would be then:

C://Ziel/abc/def/file1.stl
C://Ziel/abc/ghj/file2.stl
C://Ziel/xyz/stu/file3.stl

The common path may not be empty, especially all files have to be in the same drive or computer in the network.

Ergo the following is not possible:

C:/abc/file1.stl
D:/abc/file2.stl

Or

\\10.10.0.75/dir1/file1.stl
\\10.10.0.159/dir1/file2.stl

Spelling: (Example)

  • Short version: -t

    or

  • Long version: --targetdir

Description of the single parameters:

  • --(t)argetdir: Target directory for the converted files

  • --(l)ogfile: Log file, which contains a list of all converted files

    The file contains the complete paths to all converted output files as \t separated CSV.

    One line for each input file: col1=inputFilePath, col2=outputPathFormat1, col3=…)

  • --(e)rrorfile: Error file, which contains a list of all files where an error occurred.

    The file contains the complete paths to the faulty input files.

  • --(i)nputformats: Input formats to scan for in the source directory

    The following list exemplifies a selection of formats. Using the '--listformats' or '-l' you can output all formats in order to detect the correct names for the call up.

    Parameter Name File extension
    NATCATIAV5CATPRODUCTCatia Native CheckinCatProduct
    META3DV2PS3-V2 3Dps3
    NATINVENTORPART2011Inventor 2011ipt
    NATINVENTORASM2011Inventor 2011iam
    U3DFILEU3DU3D
    SATSAT ascii 3Dsat
    STEPINSTEP file inputSTEP
    STPINSTP file inputSTP
    IGSIGS File inputIGS

  • --(o)utputformats: Output formats

    for 3D files:

    Parameter File extension
    STLFILEstl
    PARTJAVAzjv

    for preview images:

    Parameter File extension
    BMPbmp
    PNGpng
    JPEGjpg
    TIFFtif

  • --(r)ecursive: The source directory is recursively scanned.

  • --(m)eshreduction: The geometric part complexity is reduced. Stating this parameter cannot damage anything and makes sure that the geometric index can be correctly created. But in any case a respective message is outputted in the log file.

  • --(d)ebug: An enhanced version is displayed in the command window.

  • --image(w)idth: Width of preview images

  • --image(h)eight: Hight of preview images

    In order to avoid errors please state width and hight.

[Note]Note

Please regard upper and lower case.

Example 1:

batchconvert "C:\src" --targetdir "C:\target" --meshreduction --recursive 
--outputformats BMP PARTJAVA --inputformats STLFILE  --logfile C:\logfile.txt 
--errorfile c:\errorfile.txt

Example 2:

batchconvert "C:\src": -t "C:\target" -m -r -o BMP STL -i NATSOLIDEDGEPARTST2 
NATSOLIDEDGEASMST2 -l C:\logfile.txt -e c:\errorfile.txt

[Note]Note
  • 64 Bit is currently not supported.

  • In order to avoid that already converted parts are imported again at a restart, you can use the parameter "overwrite". Possibly as of V9.03 SP3, otherwise as of SP4 (presumably).

A detailed description of the geometry import via GUI is found under Import von Geometrie-Dateien.