Reputation: 227
I am trying to create a network diagram for my office using PlantUML. I am stuck very early on. I am beginning at the edge of our network and working downwards. I would like to use the sprites as much as possible.
I have
@startuml
!include <office/Servers/application_server>
!include <office/Devices/router>
nwdiag {
internet [shape = cloud];
router [description="<$router>\nRouter"];
internet -- router;
}
@enduml
which shows
which is not using the sprite I asked for. If I rename the router in the connection like so -
@startuml
!include <office/Servers/application_server>
!include <office/Devices/router>
nwdiag {
internet [shape = cloud];
router [description="<$router>\nRouter"];
internet -- router2;
}
@enduml
I do see my sprite though obviously it's not in the right place.
I do not see what I am doing wrong. How I can I connect the internet to the object called router which has the sprite attached?
Upvotes: 2
Views: 1122
Reputation: 12902
This is one of those quirky things about ordering in PlantUML (not very logical). But I put the link line before the sprite line, and it works.
@startuml
!include <office/Servers/application_server>
!include <office/Devices/router>
nwdiag {
internet [shape = cloud];
internet -- router;
router [description="<$router>\nRouter"];
}
@enduml
Upvotes: 2