CAD Information
VMoveCAD installation folder contains a console application named CadInfo.exe for generating and displaying metadata from native CAD files in XML format. The metadata is displayed on the screen by default. The syntax of CadInfo.exe is as follows.
CadInfo [options] <input_cad_file>
E.g, CadInfo “samples/part2.catpart”
Options:
No. |
Option |
Description |
---|---|---|
1 |
–output |
Writes the output in an XML file |
2 |
–key-value-pairs |
Creates an XML file with basic information about the input CAD model |
3 |
–log-file-path |
Provides the location for the log file |
4 |
–model-file-format |
Specifies the model file format to be used instead of the default file extension derived by the application |
Examples:
VCadInfo “samples/part2.catpart”
The above example extracts the metadata from the part2.catpart located in samples folder. This information is formatted to XML format and displayed in the console.
Instead of displaying the output on the screen, users can save it in a file using the “–output” option.
CadInfo –output =”Conn_Rod_Lower_assy.xml” “Conn_Rod_Lower_assy.CATProduct”
This example generates a Conn_Rod_Lower_assy.xml file with metadata from Conn_Rod_Lower_assy.CATProduct file available in “..VCollabSamplesNative CAD FilesCatia V5 Assembly” folder. This metadata information includes the following information.
The following are the assembly/model level information
S.No.
Information
1
Cad Package Name
2
Cad Package Version
3
Author Name
4
Units
5
Metadata available in the CAD file
The following are the part level information.
S.No.
Information
1
Weight
2
Density
3
Volume
4
Mass
5
Surface Area
6
Center Of Gravity
7
Moment Of Inertia
8
Type of Material
9
Part File version (version of the software used to create the part file)
The following is the Conn_Rod_Lower_assy.xml
- Note:
The CadInfo extracts the part level metadata information only if the above properties are set in the native CAD software and available in the CAD model.
–key-value-pairs option : This option provides the basic information about the input CAD model.
CadInfo –key-value-pairs –output=”Conn_Rod_Lower_assy.xml””Conn_Rod_Lower_assy.CATProduct”
The above option writes the XML file with the following basic information.
S.No.
Information
1
Cad Package Name
2
Cad Package Version
3
Author Name
4
Units
5
Parts list
6
Materials list
The following the XML file of –key-value-pairs option
IV. –log-file-path option
CadInfo.exe –log-file-path=”c:logfilesVMoveCADlog.txt” –output=”samplespart2_metadata.xml” part2.catpart
The above example generates xml file and writes the log file in the specified path.
III. –model-file-format
CadInfo.exe–model-file-format=”parasolid_xmt”–output=”test.xml”test.xmt_txt
The above example defines test.xmt_txt as the Parasolid model and generates the xml file.
Sample metadata files that are generated from CadInfo.exe are available in “..VCollabSamplesCadInfo Output” folder for the user reference.
Error Codes
CadInfo returns one of the following error codes.
Error Code
Description
0
XML is generated successfully.
1
Unexpected error.
2
Read/Write permission is not available.
3
Unsupported input/output file extension.
4
Unsupported CAD file version
5
VMoveCAD license is not available.
6
Out of Memory
9
Invalid arguments
10
Reader API error.
11
Writer API error.
12
Unable to create log file