IBM Support

How to change the line style of a flow on an IBM Rhapsody diagram through JAVA API

Troubleshooting


Problem

You might want to change the Line Style of a flow in diagram to (dotted, dashed, ...).

Resolving The Problem

You need to write proper JAVA API for achieving the same as the following example outlines:



    IRPApplication m_rhpApplication =RhapsodyAppServer.getActiveRhapsodyApplication();
    IRPGraphElement Flow = (IRPGraphElement)m
    mrhpApplication.getSelectedGraphElements().getItem(1);
    Flow.setPropertyValue("Format.Flow.Line.LineStyle", "4");

Values are mapped as below:

    0: Solid
    1: Dashed
    2: Dotted
    3:Dash-Dot
    4:Dash-Dot-Dot

Select the line that you want to change in the diagram and run the above Java code.

[{"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":"8.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg22000086