Using 3rd party libraries in CATIA Magic (Cameo)

 

 

CATIA Magic is a huge piece of software. Besides the API and accessing the model, you also have access to the many 3rd-party libraries that we use. One of these is JideSoft Charts. https://jidesoft.com/products/charts.htm/ The library files are part of the installation and ready to use.

Here is a simple example taken from their documentation that has been modified to run as a Groovy macro. It launches a graph in a window. Note that the commented lines were to convert to Groovy and run via the Macros, but everything else is the same as the Java example. The only other change was to change the frame.setDefaultCloseOperation() to DISPOSE_ON_CLOSE so that when the window is closed, it does not close the tool. 

Note that I have not included the script (Groovy scripts can't be shared in Platform, so just an image), but I can share the code on request (it is in the JideSoft Chart manual in this link https://www.jidesoft.com/products/JIDE_Charts_Developer_Guide.pdf). 

Note that libraries may be different based on your edition, version, and configuration of plugins. Look in the /lib directory or in the plugins directories.

I have not shown how to access the model, but if you are an experienced programmer, it should be easy.

Please share your results!