Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

select !include block based on a "identifier" instead of its number

0 votes

Hello,

I found plantuml very usefull to document my code for an open source project. I use !include a lot to get information about interfaces/abstract classen in separate cpp/h files. Is it somehow possible to access the @startuml/@enduml block within an included file by an identifier instead of its number? When inserting a new diagram in a h-file I have to adjust all the numbers in file where I !include that h-file.

example:

file1:

@startuml

ID=TAG1

...

@enduml

@startuml

ID=TAG2

...

@enduml

 
file2:

@startuml

!include file1!TAG2

...

@enduml

 

 

asked Apr 30, 2016 in Wanted features by anonymous

1 Answer

0 votes

Very nice idea!

Very few tests done, but with last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar you can have:

@startuml
!include big.h!TAG2
Alice->Bob : hello
@enduml


Assuming that big.h file contains:

@startuml(id=TAG1)
Alice->Bob : TAG1
@enduml

@startuml(id=TAG2)
Alice->Bob : TAG2
@enduml



Tell us if it's working for you!

answered Apr 30, 2016 by plantuml (112,180 points)
thanks a lot for that very quick answer! works for me for the first tries!
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...