Topic
  • No replies
Champagne
Champagne
42 Posts

Pinned topic Can you use the Java API to find the current diagram

‏2012-09-04T14:42:54Z |
Hello Everybody,
This may seem like a mad question but here goes.

Does anyone know how to find the current diagram (the one that is on top in Rhapsody) using the Java API?

I want to be able to build a helper that will add a model element that represents the diagram currently selected in the model browser to the diagram currently open in the editor.

Why?
Well not just to see if it can be done, we have special stereotypes to help document and navigate around the model but there is the constraint in Rhapsody that some diagrams can't be put onto diagrams
e.g. you can put an activity diagram on an object model diagram or another activity diagram... etc
you can't put an object model diagram or a use case diagram... etc on an Object model diagram

so we use a class to represent the diagram on another diagram but it would be so much easier if we could right mouse click on the diagram we want to show on the current diagram and let the helper add the class representing it straight on the current diagram, or better still capture the drag and drop event (that fails because you can't drop a diagram on a diagram) and use that to add the class.

Any ideas or should I just tell my users to work harder?

Paul