Python4Capella in Capella-studio plug-in development

Hi everyone,

I’m trying to create a plug-in for capella in capella studio 6.0.0. The plug-in would create a menu giving the option of executing 3 commands. Each command would be linked to a Java handler which would in turn run a python script using python4capella simplified API.

So far, each script runs fine in Capella 6.0.0 using the python4capella addon. Additionally, I have been able to develop the handlers of the menu commands to run test “Hello world” python scripts which don’t depend on python4capella.

Does anyone know whether it is possible to add the python4capella libraries to a home-made plug-in to be able to execute python4capella scripts within this plug-in?

Thank you!

Dear @MSchrowange,

I have noticed a similarity between your work and my current project. From my understanding, your work can be divided into three parts:

  1. Creating the Capella4Python scripts that execute the desired functionality.
  2. Developing a Java handler that calls the specific Capella4Python script it is associated with.
  3. Finally, creating a plug-in in Capella Studio to achieve this functionality within Capella.

I also wish to call a Java handler to run a script based on the menu, but I am unsure how to create this. If you have any references or resources on this topic, I would greatly appreciate it if you could share them.

From your post, I understand that you have been able to develop handlers for menu commands. However, I may be mistaken in my interpretation. It would be immensely helpful if you could provide guidance or resources on creating a Java handler that calls the Python4Capella script.

Thank you in advance for your assistance.