Reuse declarations across pages

0 votes
asked Mar 12, 2015 in Wanted features by anonymous

Is it possible to reuse skinning and naming over multiple pages?

So that this:

@startuml
title Page 1

skinparam shadowing false
skinparam component {
  BackgroundColor<<service>> #D0E0F0
}

[Factory] as factory
[Consumer] <<service>> as consumer_service
[Provider] as provider

factory --> consumer_service
provider --> consumer_service

newpage

consumer_service ..> factory

@enduml

 

Would act like this:

@startuml
title Page 1

skinparam shadowing false
skinparam component {
  BackgroundColor<<service>> #D0E0F0
}

[Factory] as factory
[Consumer] <<service>> as consumer_service
[Provider] as provider

factory --> consumer_service
provider --> consumer_service

newpage

skinparam shadowing false
skinparam component {
  BackgroundColor<<service>> #D0E0F0
}

[Factory] as factory
[Consumer] <<service>> as consumer_service

consumer_service ..> factory

@enduml

 

1 Answer

0 votes
answered Mar 12, 2015 by plantuml (298,440 points)

That's something that we can do.

However, this would be equivalent to:

@startuml
title Page 1

skinparam shadowing false
skinparam component {
  BackgroundColor<<service>> #D0E0F0
}

[Factory] as factory
[Consumer] <<service>> as consumer_service
[Provider] as provider

factory --> consumer_service
provider --> consumer_service

newpage

skinparam shadowing false
skinparam component {
  BackgroundColor<<service>> #D0E0F0
}

[Factory] as factory
[Consumer] <<service>> as consumer_service


consumer_service ..> factory

@enduml

 

The strike text won't be present (maybe it's a typo in your proposal?).

Tell us if you are still interested with this change.

BTW, a possible workaround today would be to have a external file with your skinparam definition that you would !include twice in your diagram:

@startuml
title Page 1
!include mySkinparam.txt

[Factory] as factory
[Consumer] <<service>> as consumer_service
[Provider] as provider

factory --> consumer_service
provider --> consumer_service

newpage
!include mySkinparam.txt

[Factory] as factory
[Consumer] <<service>> as consumer_service

consumer_service ..> factory

@enduml

 

But this is not as handy as your proposal.

commented Mar 13, 2015 by anonymous
Thanks for the quick answer.

I'm not sure I understand. If I remove the strike-through text, the second page draws the components as interfaces, and it does not use the "human" texts (version 8020)

Thanks for the include approach for the skinning.
...