How to export all Object Model Diagram from Rational Rhapsody using Java API

Technote (FAQ)


Question

How do you export all Object Model Diagram from IBM Rational Rhapsody using Java API?

Cause

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.

Answer

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

Disclaimer

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();
while(myIter1.hasNext()) {
IRPDiagram myDia = (IRPDiagram) myIter1.next();
myDia.getPictureAs("C:\\Work\\Images\\"+myDia.getName()+".jpg", "JPEG",
0, null);
}



Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Rhapsody
General Information

Software version:

7.5.3, 7.5.3.1, 7.5.3.2, 7.6, 7.6.0.1, 7.6.1, 7.6.1.1, 7.6.1.2, 7.6.1.3, 8.0, 8.0.1, 8.0.2

Operating system(s):

Windows

Reference #:

1633229

Modified date:

2013-04-03

Translate my page

Machine Translation

Content navigation