How do you export all Object Model Diagram from IBM Rational Rhapsody using Java API?
You would like to use Java Application Programming Interfaces [API] code to automate the manual task to be performed with in Rational Rhapsody or to achieve something that is not possible through the Rhapsody GUI.
In order to export all Object Model Diagram from Rational Rhapsody using JAVA API iyou can use the below code as a reference. The code can be enhanced to include other specific diagram types
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
IRPApplication myApp = RhapsodyAppServer.getActiveRhapsodyApplication();
IRPProject myPrj = myApp.activeProject();
Iterator myIter1 = myPrj.getObjectModelDiagrams().toList().iterator();
IRPDiagram myDia = (IRPDiagram) myIter1.next();