Unable to create 'working' logical component #123
Replies: 2 comments 3 replies
-
Some things are missing in the API to achieve what you want to do. In the Java world we have a method to copy EObject (elements from the Capella model), but it's not available in the Python API. I opened this issue to track this.
That basically calls Java methods using the referenced Java Object of each Python Object. That's not the goal of Python4Capella since we aim at simplifying the API but it should help you until we add the copy() method. |
Beta Was this translation helpful? Give feedback.
-
We don't have API for creating Part... you might be able to use:
To crate a direct reference to a Java EObject in you script. For the moment we lack a proper API to really modify the Capella model. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Not sure whether this is a problem or a question. In my first steps with python4capella I wanted to create a script that creates a 'simulation' counterpart for each logical component in the model. The logic is shown below (based on 'List_logical_components_in_console.py'):
This works in so far that it creates logical components. However, I wasn't able to drag them on a diagram in my model. In order to find any differences between the original logical components and the new ones, I checked the 'Expert' Properties. I found a difference in 'Abstract Typed Elements'. Did I do something wrong in creating the logical components?
The original one:
The simulation one:
Any help is apprecated.
Regards,
Wilbert
Beta Was this translation helpful? Give feedback.
All reactions