Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OES cloning #220

Open
mm-capella opened this issue Aug 8, 2024 · 3 comments
Open

OES cloning #220

mm-capella opened this issue Aug 8, 2024 · 3 comments

Comments

@mm-capella
Copy link

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.

@ylussaud
Copy link
Contributor

ylussaud commented Aug 8, 2024

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:

@Nelson1905
Copy link

Hi,

Are there a website to find all eclipse function like for instante org.eclipse.sirius.business.api.query.EObjectQuery(myDiagram.get_java_object()) ?

@ylussaud
Copy link
Contributor

ylussaud commented Aug 8, 2024

That's an API from Sirius. Most code is on github:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants