I often times have the need to import 3D points (x,y,z data) into the CAD software CATIA. Currently I do this by creating an excel spreadsheet using a java library, and then executing a visual basic macro from within excel to add the data to CATIA.
Now I’m not much of a VB guy, which is why I’d like to skip the excel step and directly send data to CATIA. Is there a way to do this? Maybe a java library to allow me to call VB code? Or maybe there is a java api to CATIA which I could use?
Kind regards,
MHOOO
Unless you are lucky enough to have a CAA licence, the only API exposed by CATIA V5 is the VB one. The good thing is that this is in fact a COM interface, which you can invoke not only from VBA but also from a variety of languages that do support this protocol. (C++, Python, Java, …).
For Java, you need a library for accessing COM and thus the CATIA API. The easiest for me is Jacob (http://danadler.com/jacob/).
Here’s some sample code using Jacob:
It’s just a different way to use the CATIA VBA API, and you’ll have to rely on the documentation provided by Dassault Sytèmes.
Hope this helps.