powered by CADENAS

Manual

Manual

1.2.3. Batchconvert.exe

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://".

Supposed target path would be:

C://target

Then result would be:

C://target/abc/def/file1.stl
C://target/abc/ghj/file2.stl
C://target/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
    NATCATIAV5CATPRODUCT Catia Native Checkin CatProduct
    META3DV2 PS3-V2 3D ps3
    NATINVENTORPART2011 Inventor 2011 ipt
    NATINVENTORASM2011 Inventor 2011 iam
    U3DFILE U3D U3D
    SAT SAT ascii 3D sat
    STEPIN STEP file input STEP
    STPIN STP file input STP
    IGS IGS File input IGS

  • --(o)utputformats: Output formats

    for 3D files:

    Parameter File extension
    STLFILE stl
    PARTJAVA zjv

    for preview images:

    Parameter File extension
    BMP bmp
    PNG png
    JPEG jpg
    TIFF tif

  • --(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.

  • In order for the program to be prevented from converting ALL files again, the parameter --ignorenotmodified can be used.

    --ignorenotmodified

    Files which have not been modified are ignored at a new conversion.

    Files which have been modified are converted again and preview images are generated.

    [Caution] Caution

    In this mode --overwrite should be active, in order for preview images to be enabled to be overwritten.

    If only --overwrite is active, existing files are always overwritten.

    If neither --overwrite nor --ignorenotmodified is active, existing files are not overwritten.

  • --deleteinput

    Deletes the original files.

  • --defaultpreview3d

    Default file, if the conversion fails. The file must already have the target format.

  • --defaultpreview

    Default preview image, if the preview image cannot be created. If already the conversion of the 3D file fails, this preview image is used - if set. Otherwise the preview image is created from the default 3D file. Also here the image must have the same format as the created preview images.

[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

A detailed description of geometry import via GUI is found under Section 1.1.3.4.4.4, “ Import geometry data ”.