The “delete from diagram” command about the CommunicationMean between the OCB and OAB diagrams

Hi, all.
I found a difference about the CommunicationMean between the OCB and OAB diagrams, which is that the CommunicationMean object in the OCB diagram cannot use the “delete from diagram” command, whether in synchronous or unsynchronous states.

I am currently creating an OCB diagram, due to this problem, I have to use an OAB diagram. Does anyone know why or how to use the “delete from diagram” command in the OCB diagram for the CommunicationMean.

It is worth noting that in the OCB diagram, the “delete from diagram” command can be used for operational actor object, and in the OAB diagram, the command can be used for both operational actor and CommunicationMean objects.
The “delete from diagram” command about the CommunicationMean between the OCB and OAB diagrams

You can hide Communication Means in the OCB.
Either a Single (Hide Element) or All (Filters => Hide Communication Means)

Thank you for your reply.
Hiding the elements doesn’t solve our needs, because they’ll still be there when we need to derive the CommunicationMean object from the OCB diagram.

Not sure why you cannot delete from diagram in this case, probably that should be a feature request.
Nevertheless, I don’t get why Hiding does not fit your need. Can you clarify what you mean when you say “when we need to derive the CommunicationMean object from the OCB diagram”?
Stephane

Thank you for your reply.
Firstly, I cannot delete from diagram in this case, but I don’t think it’s just that this is an isolated case, it looks like this is a shared problem.

Secondly, I’d like to clearly explain what I mean. Briefly, I first constructed an OCB diagram ([OCB] Operational Capabilities), which may contain comprehensive elements such as OA1, OA2, CommunicationMean 1 and CommunicationMean 2. Then I cloned the diagram, to form the diagram Clone of [OCB] Operational Capabilities, and only wanted to present some of the elements, e.g. not to present CommunicationMean 1. At this point I would have liked to use the “delete from diagram” command, but at the moment I can only use the “Hide Element” command (as in Figure 1). Finally, I used the Python4Capella plugin to export the CommunicationMean in these two diagrams to compare the differences, and found that the diagram of [OCB] Operational Capabilities will show CommunicationMean 1 and CommunicationMean 2 (Figure 2), while hiding the element achieves the same result as I wanted, which is to show only CommunicationMean 2 (Figure 3). I would have thought that the “delete from diagram” command would be possible, but it seems that the “Hide Element” command is also feasible.@ haage



The script:
#diagram_name = “[OCB] Operational Capabilities”
diagram_name = “Clone of [OCB] Operational Capabilities”
for diag in JavaList(org.eclipse.sirius.business.api.dialect.DialectManager.INSTANCE.getAllRepresentationDescriptors(model.session),Diagram):
if diag.get_name() == diagram_name:
for comp in diag.get_represented_elements():
if isinstance(comp, CommunicationMean):
print(comp.get_name())

Hi Luke,
Yes, I confirm that the delete from diagram seems to be not available on the OCB for communication means, and this is probably a missing feature.
Glad to read that hiding the element does the job for you.
Stephane