Create links after creating a diagram

0 votes
asked Feb 2, 2018 in Closed feature request by hhhannes (160 points)

Let's say I would like to use the link feature to reference from sequence diagram messages to a more detailed description somewhere.

I can do it like that:

a -> b: [[/messages.html#010 write(a)]]

Now, assume the target of a link is a document where the anchors correspond to the auto-numbered messages. But the numbering is only available at rendering time.

Is there a way to hook into diagram creation and use a templating mechanism to create the links dynamically? 



2 Answers

0 votes
answered Feb 5, 2018 by plantuml (295,000 points)
selected Mar 21, 2018 by Anthony-Gaudino
Best answer

So with last beta

You can have:

autonumber 10
Alice -> Bob: [[/messages.html#%autonumber% write(a)]]
note left
  the autonumber works everywhere.
  Here, its value is %autonumber%
end note
Bob --> Alice: Response %autonumber%

This has not been highly tested, so feedback welcome!

0 votes
answered Feb 4, 2018 by plantuml (295,000 points)

Sorry, it's not possible yet.

But we are thinking about allowing something like:

autonumber 10
Alice -> Bob: [[/messages.html#%autonumber% write(a)]]
Bob --> Alice: Response

The %autonumber% variable would be replaced by the corresponding value. Would this meet your expectations ?

commented Feb 5, 2018 by hhhannes (160 points)
That sounds amazing!