autonumber and references in sequence diagrams

+3 votes
asked May 8, 2014 in Closed feature request by anonymous
Is it possible to reference the numbers generated by the autonumber function? Sometimes it would be desirable to be able to reference a particular flow from a note (or other location). The only way to do this today is to use the real/generated number, which will of course change as you add other flows
commented Nov 24, 2020 by mawi (620 points)
This is not possible today, I believe. The %autonumber% variable is available at each step, but you cannot store it in a reference/variable and then use it in a note (or other text) later in the diagram.

2 Answers

+1 vote
answered May 9, 2014 by plantuml (295,000 points)
Hello,

Well, good idea!

Do you have any suggestion about the syntax ?

Thanks,
commented May 9, 2014 by anonymous
Maybe using the poung (#) character? Something like this:

@startuml
autonumber "[0]"

A->B: message
#first-message   /`This should take the value of the last number that has been used by the autonumber functionality`/

B->A: This is the response to message #first-message

note over A: This is a note that references message #first-message

@enduml
0 votes
answered Feb 25, 2018 by Anthony-Gaudino (5,720 points)
Seems to be implemented here http://forum.plantuml.net/7119
...