Hello Martin,
thank you for your hint. I'll give it also a try. For now I applied Andy's solution which works great. But indeed, your proposal should solve it also and also very basic, at least in our diagrams we quite seldom show the name of a connector.
Looks I should dig a bit in all the properties, it seems there is a property for each and everything in Rhapsody. ;-)
Best regards
Robert
------------------------------
Robert Fromm
------------------------------
Original Message:
Sent: Thu August 14, 2025 10:46 AM
From: Martin Stockl
Subject: Java API Questions regarding GraphicalElements
Hello Robert,
I'm not sure whether this workaround may help to solve at least your first issue, but I wanted to give it a try.
If you fail to modify the display option for links AFTER you put them onto the diagram, an alternate solution would be to modify the diagram default for how to show links, BEFORE you put them onto the diagram. You should be able to change and save these diagram properties via the API to be used for all new elements elements created on the diagram:

Above feature dialog shows the graphical settings for a Link on an OMD, but these properties are available for other structural diagrams as well.
So if your default shall be "None" for all links, this may be helpful.
If you need to decide this case by case, then switching the diagram default between adding links is still possible.
But if you want to change the display option AFTER adding them, this workaround will not be of any help.
Best regards
Martin
------------------------------
[Martin] [Stockl]
[SodiusWillert Germany]
[
Embedded Real-Time Systems Modeling Specialist]
Original Message:
Sent: Tue December 17, 2024 01:20 PM
From: Robert Fromm
Subject: Java API Questions regarding GraphicalElements
Hello community,
I'm currently creating a helper tool which checks two ports for common interface contracts and then creates a connector with flows that convey all information for which the ports have common contracts. All fine yet, works basically quite well.
But two topics remain finally:
- the name of the connector is displayed in the diagram. I want to hide it. I can access the name via
IRPCollection graphElements = myDiagram.getCorrespondingGraphicalElements(connector);
for (int i=1; i<=graphElements.getCount();i++) {
IRPGraphicalElement ge = (IRPGraphElement) graphElements.getItem(i);
ge.getGraphicalPropertyOfText("Label", "Text").getValue(); // shows the name of the connector
}
but I can't change the visibility. Found no real snippet how to do so, e.g. property "isVisible", "ShowElementNames" seem not not work. Does anyone know how to get the name of the connector (i.e. "Label" of the line) invisible? - The text box with the conveyed flow might get quite large (i.e. very wide). Does anyone know, how I can access its size (width, height) to ajdust it at least in a way that I do not have to scroll always to adjust the Conveyed text box manually?
Thank you.
Best regards
Robert
------------------------------
Robert Fromm
------------------------------