Extracting Metadata from eCatalog

I want to extract some parts of the metadata of all robots present in the eCatalog using python. I know you can access component properties but how can I access metadata using python? Since there are a lot of robots, ideally I want to extract metadata without importing them in the 3d world.

Any hint or direction will be appreciated.

Hello,

I couldn’t find API documentation about this, but you can open up the vcmx file (it’s basically a archived zip file or similar) and then go to its component.dat file and read that. The metadata is as far as I recall, stored there. Parsing the text is more or less pure coding at that point.

br,
Lefa

1 Like

Thanks for the reply.

I only see a Robots.afc file of size 51 MB in the Visual Components installation folder’s Catalog folder. Can you please specify where can I find the vcmx files for all robots?

Also, do you mean opening/exploring the vcmx file outside of Visual Components and reading data out of its component.dat file in an IDE?

Hi,

The eCatalog “lives” in your local harddrive, at
%localappdata%Visual Components\Visual Components Premium \eCatalog

and yes, this is out of the scope of the API itself, at this point you treat .vcmx file as a zip file that you open up with any coding language of your choice and any text editor/IDE of your choice, study its structure and study the syntax of the component.dat file and implement the functionality in a way that works for you.

The high level description would be, find the os.path, find the correct file, find the correct text file inside the file, parse the text, use the parsed data in your implementation.

Of course, all of this can be ignored if I was simply wrong and there’s an API call for metadata :smiley:

br,
Lefa

hi,

maybe this could help:

vcHelpers.VcmFile provides access to the metadata of a local component file.

from help file:
https://help.visualcomponents.com/4.9/Premium/de/Python_API/vcHelpers.VcmFile.htm?rhhlterm=componentdata&rhsearch=ComponentData

2 Likes

Nice, that seems to work