How to fix this

0 votes
asked 4 days ago in Question / help by karas (120 points)
I am only starting with PlantUML and i need to create an L2 scheme. I tried it and it didn't go well. Is there a way to place objects only vertically and manage lines more prolerly, it looks chaotically right now and this is like 1/5 of i want to be on diagram

@startuml
package Stand1{
 object St1_U41{
  34
 }
}
package Stand1{
 object St1_U41{
  36
 }
}
package Stand1{
 object St1_U41{
  38
 }
}
package Stand1{
 object St1_U41{
  37
 }
}
package Stand1{
 object St1_U41{
  40
 }
}
package Stand1{
 object St1_U41{
  39
 }
}
package Stand1{
 object St1_U41{
  47
 }
}
package Stand1{
 object St1_U41{
  48
 }
}
package Stand1{
 object St1_U41{
  49
 }
}
package Stand1{
 object St1_U41{
  51
 }
}
package Stand1{
 object St1_U40{
  In1
 }
}
package Stand1{
 object St1_U39{
  In1
 }
}
package Stand1{
 object St1_U39{
  1
 }
}
package Stand1{
 object St1_U39{
  5
 }
}
package Stand1{
 object St1_U39{
  8
 }
}
package Stand1{
 object St1_U39{
  9
 }
}
package Stand1{
 object St1_U39{
  11
 }
}
package Stand1{
 object St1_U39{
  12
 }
}
package Stand1{
 object St1_U39{
  VGA
 }
}
package Stand1{
 object St1_U38{
  1
 }
}
package Stand1{
 object St1_U38{
  In1
 }
}
package Stand1{
 object St1_U37{
  1
 }
}
package Stand1{
 object St1_U37{
  In1
 }
}
package Stand1{
 object St1_U36{
  1
 }
}
package Stand1{
 object St1_U36{
  3
 }
}
package Stand1{
 object St1_U36{
  4
 }
}
package Stand1{
 object St1_U36{
  6
 }
}
package Stand1{
 object St1_U36{
  In1
 }
}
package Stand1{
 object St1_U36{
  In2
 }
}
package Stand1{
 object St1_U35{
  1
 }
}
package Stand1{
 object St1_U35{
  In1
 }
}
package Stand1{
 object St1_U34{
  In1
 }
}
package Stand1{
 object St1_U34{
  1
 }
}
package Stand1{
 object St1_U34{
  2
 }
}
package Stand1{
 object St1_U34{
  3
 }
}
package Stand1{
 object St1_U34{
  8
 }
}
package Stand1{
 object St1_U34{
  VGA
 }
}

package Stand1{
 object St1_U34{
  In1
 }
}
package Stand1{
 object St1_U39{
  In1
 }
}
package Stand1{
 object St1_U36{
  In1
 }
}
package Stand1{
 object St1_U36{
  In2
 }
}
package Stand1{
 object St1_U35{
  In1
 }
}
package Stand1{
 object St1_U40{
  In1
 }
}
package Stand1{
 object St1_U38{
  In1
 }
}
package Stand1{
 object St1_U37{
  In1
 }
}
package Stand1{
 object St1_U34{
  8
 }
}
package Stand1{
 object St1_U39{
  8
 }
}
package Stand1{
 object St1_U41{
  39
 }
}
package Stand1{
 object St1_U41{
  36
 }
}
package Stand1{
 object St1_U10{
  20
 }
}
package Stand3{
 object St3_U38{
  25
 }
}
package Stand1{
 object St1_U41{
  51
 }
}
package Stand3{
 object St3_U39{
  51
 }
}
package Stand1{
 object St1_U28{
  1
 }
}
package Stand3{
 object St3_U40{
  5
 }
}
package Stand2{
 object St2_U15{
  2
 }
}
package Stand3{
 object St3_U40{
  8
 }
}
package Stand1{
 object St1_U41{
  48
 }
}
package Stand1{
 object St1_U29{
  2
 }
}
package Stand1{
 object St1_U41{
  47
 }
}
package Stand1{
 object St1_U27{
  em0
 }
}
package Stand3{
 object St3_U41{
  19
 }
}
package Stand3{
 object St3_U41{
  20
 }
}
package Stand1{
 object St1_U27{
  em2
 }
}
package Stand1{
 object St1_U41{
  38
 }
}
package Stand1{
 object St1_U41{
  37
 }
}
package Stand1{
 object St1_U28{
  2
 }
}
package Stand1{
 object St1_U41{
  40
 }
}
package Stand1{
 object St1_U41{
  34
 }
}
package Stand3{
 object St3_U42{
  21s
 }
}
package Stand3{
 object St3_U42{
  22s
 }
}
package Stand1{
 object St1_U27{
  igb1
 }
}
package Stand1{
 object St1_U41{
  49
 }
}
package Stand2{
 object St2_U15{
  1
 }
}

St1_U41::34 -- St1_U34::In1
St1_U41::36 -- St1_U39::In1
St1_U41::38 -- St1_U36::In1
St1_U41::37 -- St1_U36::In2
St1_U41::40 -- St1_U35::In1
St1_U41::39 -- St1_U40::In1
St1_U41::47 -- St1_U38::In1
St1_U41::48 -- St1_U37::In1
St1_U41::49 -- St1_U34::8
St1_U41::51 -- St1_U39::8
St1_U40::In1 -- St1_U41::39
St1_U39::In1 -- St1_U41::36
St1_U39::1 -- St1_U10::20
St1_U39::5 -- St3_U38::25
St1_U39::8 -- St1_U41::51
St1_U39::9 -- St3_U39::51
St1_U39::11 -- St1_U28::1
St1_U39::12 -- St3_U40::5
St1_U39::VGA -- St2_U15::2
St1_U38::1 -- St3_U40::8
St1_U38::In1 -- St1_U41::48
St1_U37::1 -- St1_U29::2
St1_U37::In1 -- St1_U41::47
St1_U36::1 -- St1_U27::em0
St1_U36::3 -- St3_U41::19
St1_U36::4 -- St3_U41::20
St1_U36::6 -- St1_U27::em2
St1_U36::In1 -- St1_U41::38
St1_U36::In2 -- St1_U41::37
St1_U35::1 -- St1_U28::2
St1_U35::In1 -- St1_U41::40
St1_U34::In1 -- St1_U41::34
St1_U34::1 -- St3_U42::21s
St1_U34::2 -- St3_U42::22s
St1_U34::3 -- St1_U27::igb1
St1_U34::8 -- St1_U41::49
St1_U34::VGA -- St2_U15::1

@enduml

1 Answer

0 votes
answered 4 days ago by The-Lu (49,760 points)

Hello K.,

Here is a proposal:

  • adding 'left to right direction'
  • and changing some arrow length...
@startuml
left to right direction
package Stand1{
 object St1_U41{
  34
 }
}
package Stand1{
 object St1_U41{
  36
 }
}
package Stand1{
 object St1_U41{
  38
 }
}
package Stand1{
 object St1_U41{
  37
 }
}
package Stand1{
 object St1_U41{
  40
 }
}
package Stand1{
 object St1_U41{
  39
 }
}
package Stand1{
 object St1_U41{
  47
 }
}
package Stand1{
 object St1_U41{
  48
 }
}
package Stand1{
 object St1_U41{
  49
 }
}
package Stand1{
 object St1_U41{
  51
 }
}
package Stand1{
 object St1_U40{
  In1
 }
}
package Stand1{
 object St1_U39{
  In1
 }
}
package Stand1{
 object St1_U39{
  1
 }
}
package Stand1{
 object St1_U39{
  5
 }
}
package Stand1{
 object St1_U39{
  8
 }
}
package Stand1{
 object St1_U39{
  9
 }
}
package Stand1{
 object St1_U39{
  11
 }
}
package Stand1{
 object St1_U39{
  12
 }
}
package Stand1{
 object St1_U39{
  VGA
 }
}
package Stand1{
 object St1_U38{
  1
 }
}
package Stand1{
 object St1_U38{
  In1
 }
}
package Stand1{
 object St1_U37{
  1
 }
}
package Stand1{
 object St1_U37{
  In1
 }
}
package Stand1{
 object St1_U36{
  1
 }
}
package Stand1{
 object St1_U36{
  3
 }
}
package Stand1{
 object St1_U36{
  4
 }
}
package Stand1{
 object St1_U36{
  6
 }
}
package Stand1{
 object St1_U36{
  In1
 }
}
package Stand1{
 object St1_U36{
  In2
 }
}
package Stand1{
 object St1_U35{
  1
 }
}
package Stand1{
 object St1_U35{
  In1
 }
}
package Stand1{
 object St1_U34{
  In1
 }
}
package Stand1{
 object St1_U34{
  1
 }
}
package Stand1{
 object St1_U34{
  2
 }
}
package Stand1{
 object St1_U34{
  3
 }
}
package Stand1{
 object St1_U34{
  8
 }
}
package Stand1{
 object St1_U34{
  VGA
 }
}

package Stand1{
 object St1_U34{
  In1
 }
}
package Stand1{
 object St1_U39{
  In1
 }
}
package Stand1{
 object St1_U36{
  In1
 }
}
package Stand1{
 object St1_U36{
  In2
 }
}
package Stand1{
 object St1_U35{
  In1
 }
}
package Stand1{
 object St1_U40{
  In1
 }
}
package Stand1{
 object St1_U38{
  In1
 }
}
package Stand1{
 object St1_U37{
  In1
 }
}
package Stand1{
 object St1_U34{
  8
 }
}
package Stand1{
 object St1_U39{
  8
 }
}
package Stand1{
 object St1_U41{
  39
 }
}
package Stand1{
 object St1_U41{
  36
 }
}
package Stand1{
 object St1_U10{
  20
 }
}
package Stand3{
 object St3_U38{
  25
 }
}
package Stand1{
 object St1_U41{
  51
 }
}
package Stand3{
 object St3_U39{
  51
 }
}
package Stand1{
 object St1_U28{
  1
 }
}
package Stand3{
 object St3_U40{
  5
 }
}
package Stand2{
 object St2_U15{
  2
 }
}
package Stand3{
 object St3_U40{
  8
 }
}
package Stand1{
 object St1_U41{
  48
 }
}
package Stand1{
 object St1_U29{
  2
 }
}
package Stand1{
 object St1_U41{
  47
 }
}
package Stand1{
 object St1_U27{
  em0
 }
}
package Stand3{
 object St3_U41{
  19
 }
}
package Stand3{
 object St3_U41{
  20
 }
}
package Stand1{
 object St1_U27{
  em2
 }
}
package Stand1{
 object St1_U41{
  38
 }
}
package Stand1{
 object St1_U41{
  37
 }
}
package Stand1{
 object St1_U28{
  2
 }
}
package Stand1{
 object St1_U41{
  40
 }
}
package Stand1{
 object St1_U41{
  34
 }
}
package Stand3{
 object St3_U42{
  21s
 }
}
package Stand3{
 object St3_U42{
  22s
 }
}
package Stand1{
 object St1_U27{
  igb1
 }
}
package Stand1{
 object St1_U41{
  49
 }
}
package Stand2{
 object St2_U15{
  1
 }
}

St1_U41::34 -- St1_U34::In1
St1_U41::36 -- St1_U39::In1
St1_U41::38 -- St1_U36::In1
St1_U41::37 -- St1_U36::In2
St1_U41::40 -- St1_U35::In1
St1_U41::39 -- St1_U40::In1
St1_U41::47 -- St1_U38::In1
St1_U41::48 -- St1_U37::In1
St1_U41::49 -- St1_U34::8
St1_U41::51 -- St1_U39::8
St1_U40::In1 -- St1_U41::39
St1_U39::In1 -- St1_U41::36
St1_U39::1 -- St1_U10::20
St1_U39::5 ---- St3_U38::25
St1_U39::8 -- St1_U41::51
St1_U39::9 ---- St3_U39::51
St1_U39::11 -- St1_U28::1
St1_U39::12 -- St3_U40::5
St1_U39::VGA ---- St2_U15::2
St1_U38::1 ---- St3_U40::8
St1_U38::In1 -- St1_U41::48
St1_U37::1 -- St1_U29::2
St1_U37::In1 -- St1_U41::47
St1_U36::1 --- St1_U27::em0
St1_U36::3 ---- St3_U41::19
St1_U36::4 ---- St3_U41::20
St1_U36::6 -- St1_U27::em2
St1_U36::In1 -- St1_U41::38
St1_U36::In2 -- St1_U41::37
St1_U35::1 -- St1_U28::2
St1_U35::In1 -- St1_U41::40
St1_U34::In1 -- St1_U41::34
St1_U34::1 ---- St3_U42::21s
St1_U34::2 ---- St3_U42::22s
St1_U34::3 -- St1_U27::igb1
St1_U34::8 -- St1_U41::49
St1_U34::VGA ---- St2_U15::1

@enduml

If that can help,
Regards.
Th.

commented 3 days ago by karas (120 points)
Thanks, it really helps. Is there a way to do lines with 90 degree turns?
commented 3 days ago by The-Lu (49,760 points)

Hello K., and all,

You can test:

skinparam linetype ortho

or

skinparam linetype polyline

or

!pragma layout smetana

or

!pragma layout elk

but this is not conclusive...

If that can help,
Regards.

commented 5 hours ago by The-Lu (49,760 points)

Hello K.,

Could you have also a look on:

That is only on beta version... But all remarks or comments are welcome...

Regards.

...