Translating a CAD File to a CAX File in Batch Mode
VCollab Suite provides a batch utility called VMoveCADBatch.exe which is used to generate CAX files from CAD files without user intervention. The syntax for VMoveCADBatch.exe is as follows:
VMoveCADBatch.exe [option=value] <input_cad_file/input_directory> <output_cax_file/output_directory>
<input_cad_file/input_directory> represents the input CAD file or the input directory
<output_cax_file/output_directory> represents the output CAX file or the output directory
The above two arguments are mandatory for running VMoveCADBatch.exe.
Input Mode - File
The most basic use of VMoveCADBatch is to translate a CAD file into a CAX file. This can be achieved by providing the input file path and output file path. No other options need to be specified. For example, the following command takes the file part2.catpart from samples folder as input and creates a CAX file named part2.cax in samples folder.
VMoveCADBatch.exe samples\part2.catpart samples\part2.cax
Input Mode - Directory
VMoveCADBatch can also translate multiple CAD files located in a directory to CAX files. This can be achieved by providing the input directory path and output directory path. No other options need to be specified. For example, the following command loads all the CAD files from the cad_files folder and creates equivalent CAX files in the cax_files folder.
VMoveCADBatch.exe –dir cad_files cax_files
Other options provided by VMoveCADBatch are mentioned below. They can be used in any order.
S.No. |
Option |
Description |
---|---|---|
1 |
–dir |
Specifies the input mode as directory |
2 |
–output-format |
Specifies the output format. It can be CAX or CGR. By default, it is CAX. This option is generally used for directory mode |
3 |
–tess-tolerance |
Specifies the tolerance value for tessellation. By default, the value is 0.0005 |
4 |
–ignore-transparency |
Allows the user to ignore the transparency. By default, the value is false. |
5 |
–log-file-path |
Allows the user to provide a VMoveCAD log file path. |
6 |
–units |
Allows the user to change the units of the CAD model.Valid options for units are milli-meter, centimeter, inch, feet and meter. |
7 |
–detailed-log |
Allows the user to write detailed log information for troubleshooting. |
8 |
–export-surface |
Allows the user to write the surface geometry into CAX. This option is enabled by default. |
9 |
–export-lines |
Allows the user to write the lines and curves into CAX. This option is enabled by default. |
10 |
–export-pointset |
Allows the user to write the pointset into CAX |
11 |
–model-file-format |
Lets the user specify the model file format instead of application deriving from the file extension |
Examples
VMoveCADBatch.exe –tess-tolerance=”0.10” part2.catpart part2.cax
The above example converts part2.catpart into part2.cax for the tessellation value 0.10. This example reduces the number of triangles (as compared to default tessellation value of 0.0005) in the model as well as the file size of the CAX file.
VMoveCADBatch.exe –ignore-transparency part2.catpart part2.cax
The above example converts part2.catpart into part2.cax , in which the transparency of CAD model is ignored.
VMoveCADBatch.exe –log-file-path=”c:logfilesVMoveCADlog.txt” part2.catpart part2.cax
The above example converts the part2.catpart into part2.cax and writes the log file in the specified path.
VMoveCADBatch.exe –units=”Inch” part2.catpart part2.cax
The above example converts the part2.catpart into part2.cax with inch as the unit of the CAX model.
VMoveCADBatch.exe –detailed-log part2.catpart part2.cax
The above example lets the application to write additional log information for troubleshooting.
VMoveCADBatch.exe –export-surface part2.catpart part2.cax
The above example lets the application write mesh into CAX file. The surface geometry can be ignored in the CAX file by providing the option –export-surface=false.
VMoveCADBatch.exe –export-lines part2.catpart part2.cax
The above example lets the application write 2D Elements into a CAX file. The lines and curves can be ignored in the CAX file by providing the option –export-lines=false.
VMoveCADBatch.exe –export-pointset part2.catpart part2.cax
The above example lets the application write the pointset into a CAX file. The points can be ignored in CAX file by providing the option –export-pointset=false
VMoveCADBatch.exe –model-file-format=”parasolid_xmt” test.xmt_txt test.cax
The above example lets the user define the model file format. Here ‘parasolid_xmt’ lets the application understand that the test.xmt_txt is the parasolid format.
VMoveCADBatch.exe –dir cad_files cax_files
The above example converts all the CAD models from the cad_files folder into CAX files and saves them in the cax_files folder.
VMoveCADBatch.exe – dir –output-format=”cgr” cad_files cgr_files
The above example converts all the CAD models from the cad_files folder into CGR files in the cgr_files folder
Note:
It is mandatory to enclose the input and output file paths in quotes (“”) when it contains spaces. The quotes can be avoided if no spaces are involved.
The options are not case sensitive.
Error Codes
At the end of every run, VMoveCADBatch returns one of the following error codes.
Error Code |
Description |
---|---|
0 |
CAX is generated successfully. |
1 |
Unexpected error. |
2 |
Read/Write permission not available. |
3 |
Unsupported input/output file extension |
4 |
Unsupported CAD file version |
5 |
VMoveCAD license not available. |
6 |
Out of Memory |
7 |
Invalid arguments |
8 |
Reader API error. |
9 |
Writer API error. |
10 |
Unable to create log file |