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:

  1. 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.

  2. 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

<node name=”VMoveCAD”>
<node name=”Conn_Rod_Lower_assy”>
<attribute key=”modelFile” value=”C:Program FilesVCollabSamplesNative CAD FilesCatia V5 AssemblyConn_Rod_Lower_assy.CATProduct”/>
<node name=”modelParameters”>
<attribute key=”cadPackageName” value=”Catia V5”/>
<attribute key=”cadPackageVersion” value=”Unknown”/>
<attribute key=”units” value=”Millimeter”/>
</node>
<node name=”Conn_Rod_Lower_assy”>
<node name=”Conn_Rod_Lower_assy”>
<node name=”Lower_conn_Rod”>
<attribute key=”Density” value=”7200.000000 kg_m3”/>
<attribute key=”Volume” value=”0.000030 m3”/>
<attribute key=”Mass” value=”0.212725 kg”/>
<attribute key=”Weight” value=”2.086120 kg”/>
<attribute key=”Surface” value=”0.011329 m2”/>
<attribute key=”xCenterOfGravity” value=”0.000000 mm”/>
<attribute key=”yCenterOfGravity” value=”-0.000000 mm”/>
<attribute key=”zCenterOfGravity” value=”-17.944407 mm”/>
<attribute key=”Ixx” value=”0.000239 kgxm2”/>
<attribute key=”Iyx” value=”0.000000 kgxm2”/>
<attribute key=”Izx” value=”0.000000 kgxm2”/>
<attribute key=”Ixy” value=”0.000000 kgxm2”/>
<attribute key=”Iyy” value=”0.000049 kgxm2”/>
<attribute key=”Izy” value=”0.000000 kgxm2”/>
<attribute key=”Ixz” value=”0.000000 kgxm2”/>
<attribute key=”Iyz” value=”0.000000 kgxm2”/>
<attribute key=”Izz” value=”0.000228 kgxm2”/>
<attribute key=”TypeOfMaterial” value=”Iron”/>
</node>
<node name=”Big_End_Bearing”>
<attribute key=”Density” value=”11340.000000 kg_m3”/>
<attribute key=”Volume” value=”0.000006 m3”/>
<attribute key=”Mass” value=”0.066335 kg”/>
<attribute key=”Weight” value=”0.650524 kg”/>
<attribute key=”Surface” value=”0.006947 m2”/>
<attribute key=”xCenterOfGravity” value=”-16.000000 mm”/>
<attribute key=”yCenterOfGravity” value=”19.763249 mm”/>
<attribute key=”zCenterOfGravity” value=”0.000000 mm”/>
<attribute key=”Ixx” value=”0.000038 kgxm2”/>
<attribute key=”Iyx” value=”0.000000 kgxm2”/>
<attribute key=”Izx” value=”0.000000 kgxm2”/>
<attribute key=”Ixy” value=”0.000000 kgxm2”/>
<attribute key=”Iyy” value=”0.000038 kgxm2”/>
<attribute key=”Izy” value=”0.000000 kgxm2”/>
<attribute key=”Ixz” value=”0.000000 kgxm2”/>
<attribute key=”Iyz” value=”0.000000 kgxm2”/>
<attribute key=”Izz” value=”0.000012 kgxm2”/>
<attribute key=”TypeOfMaterial” value=”Lead”/>
</node>
</node>
</node>
</node>
</node>
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.

  1. –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

<vct:metadata xmlns:vct=”http://www.vcollab.com/xml/namespace”>
<attribute name=”modelFile” value=”C:Program FilesVCollabSamplesNative CAD FilesCatia V5 AssemblyConn_Rod_Lower_assy.CATProduct”/>
<attribute name=”cadPackageName” value=”Catia V5”/>
<attribute name=”cadPackageVersion” value=”Unknown”/>
<attribute name=”authorName” value=””/>
<attribute name=”units” value=”Millimeter”/>
<attribute name=”parts” value=”Lower_conn_Rod,Big_End_Bearing”/>
<attribute name=”materials” value=”Iron, Lead”/>
</vct:metadata>

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