IBM Support

How to determine the Metaclass for a Rhapsody element

Question & Answer


Question

How can you determine the metaclass for an element within IBM Rational Rhapsody?

Answer

You may want to construct a VBA macro to perform various operations within your Rational Rhapsody model.

During the development of the VBA macro, you will need to know the metaclass of certain Rhapsody elements.

An easy way to determine the metaclass of an element is to construct the following macro within VBA.

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.




Sub test()

Dim elem As RPModelElement

Set elem = getSelectedElement()

End Sub


Set a Breakpoint on the "Set elem = getSelectedElement()" line and then Run the macro.

In the output listed within the VBA Module, expand the 'elem' Expression and the metaclass information will be listed.

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21417478