How to insert a minimum horizontal space between 2 participants or 2 groups in a sequence diagram

0 votes
asked Apr 12, 2017 in Closed question / help by PascalChap (340 points)

In my sequence diagram I am using par2 to show the parallel execution of 2 loops in different CPU cores, but the 2 loop boxes are overlapping, and the graphical result is poor, and hard to read:

@startuml

box "group 1" #lightblue
    Participant P1
    Participant P2
end box
' I would like to insert an horizontal minimu space constraint here
box "group 2" #lightgreen
    Participant P3
    Participant P4
end box

par2
    loop forever
        P1 -> P2
        P2 --> P1
        end
else
    loop forever
        P3 -> P4
        P4 --> P3
    end
end
@enduml

1 Answer

0 votes
answered Apr 12, 2017 by Serge Wenger Work (15,620 points)
selected Apr 12, 2017 by PascalChap
 
Best answer
Hello, 
Start with the following:
 
@startuml
skinparam BoxPadding 30
 
Hope this helps
commented Apr 12, 2017 by PascalChap (340 points)
Thanks for answering. Unfortunately, it has no effect in this case (I am using the 2017.10 version)
commented Apr 12, 2017 by Serge Wenger Work (15,620 points)
Very strange, because it is working with version 2017.09 (on the web site) and 2017.10 locally:

@startuml
skinparam BoxPadding 40

box "group 1" #lightblue
    Participant P1
    Participant P2
end box
' I would like to insert an horizontal minimu space constraint here
box "group 2" #lightgreen
    Participant P3
    Participant P4
end box

par2
    loop forever
        P1 -> P2
        P2 --> P1
        end
else
    loop forever
        P3 -> P4
        P4 --> P3
    end
end
@enduml
commented Apr 12, 2017 by PascalChap (340 points)
You are right, it works :o). I was testing the code using the diagram plugin for sublime, and it was using a "hidden" copy of plantuml version 8024.
I modified the python code to remove the version test and it is ok now, both when invoking directly plantuml from windows or from the plugin.
commented Jun 19, 2018 by Steven Roose
This doesn't seem to work in the Teoz architecture.
commented Jun 20, 2018 by Serge Wenger Work (15,620 points)
You are right. I create a small sample to reproduce on a new message
...