Zurück zu Willert.de

Any VBA API for Diagram layout??

how to access or perform things by using the Rhapsody API (not how to use the UI)

Any VBA API for Diagram layout??

Postby vijay.emmanuel » July 11th, 2008, 1:05 am

Hello All,
I am trying to customise some UML operations like adding / deleting relations between classes. I do the operations using some VBA macros. But I am stuck up :cry: updating the class diagrams after I am done with my changes in relations.... My model is kind of huge.... So that makes it difficult to remember and select all the class names to draw a new class diagram by Rhapsody Populate Diagram feature in Add New Structure Diagram.

I want to create a diagram using the same macro, so I that I dont need to remember all of it.
I found that we can do this IRPDiagram by addnewnodeforelement.
But this way I am not able to arrange the all nodes and relation edges in a hierarchial or orthogonal layout.. Which was possible when I do by the Rhapsody Populate Diagram feature.....
Is there a way to arrange the layout for the diagram by a VBA API?

Please help !!!! i would reallly appreciate any suggestions :wink:
Posts: 3
Joined: July 11th, 2008, 12:44 am

Postby rustbuster » July 9th, 2009, 9:21 pm

The AddNewNodeForElement() operation requires that you specify the x and y coordinates of the symbol on the diagram as well as the symbol height and width. You can easily create any layout structure you want by calculating the values for these coordinates.

Posts: 2
Joined: December 4th, 2008, 8:21 pm

Re: Any VBA API for Diagram layout??

Postby andyl » November 26th, 2010, 1:49 pm

FYI PopulateDiagram is now available through the API

Get Rhapsody Tips, Tricks, Tutorials, Wizards and Sample Models here:

Posts: 23
Joined: March 3rd, 2008, 5:12 pm
Location: UK

Return to Rhapsody API

Who is online

Users browsing this forum: No registered users and 3 guests