Open mm-capella opened 2 months ago
I guess the new diagram is a reference to the same Java diagram object. You need to create a copy of the representation first:
e_object_query = org.eclipse.sirius.business.api.query.EObjectQuery(myDiagram.get_java_object())
org.eclipse.sirius.business.api.dialect.DialectManager.INSTANCE.copyRepresentation(myDiagram.get_java_object(), 'My representation Copy', e_object_query.getSession(), None)
At the moment we don't have APIs to modify diagrams but you can use the Java API from your Python4Capella script just like in the above example. You can also find some example of modifications on the Capella scripting forum:
Hi,
Are there a website to find all eclipse function like for instante org.eclipse.sirius.business.api.query.EObjectQuery(myDiagram.get_java_object())
?
That's an API from Sirius. Most code is on github:
Hi, I was creating Operational Entity Scenarios and was wanting to create a copy of a diagram to save time and make a minor change. How do we unsync the new diagram from the old one. All changes I make in the new diagram adjusts the old one.