Add note after increment autonumber not working

0 votes
asked Mar 6, 2023 in Bug by Goczilla1990 (140 points)


When I increment the autonumber functionnailty with "inc", it is working if I cerate a message after, but not if I use the %autonumber% variable in a note. Is it normal ? Mayve I am doing somehting wrong.


Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

autonumber inc
note over Bob: %autonumber% instead of 3

Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
note over Bob: %autonumber%

Thank you in advance for the help.

1 Answer

0 votes
answered Mar 8, 2023 by Serge Wenger Work (15,620 points)
commented Mar 8, 2023 by Goczilla1990 (140 points)

Thank you.

But you answer to my other question here Not increment message when hidden - PlantUML Q&A.

Here, it is about the notes between messages after increment the autonumber manually with "inc". Any advice ?


commented Mar 8, 2023 by Serge Wenger Work (15,620 points)
Sorry, for the answer in the wrong message.

As you can see %autonumber%" is the last number in a message, The %autonumber% is utpdated only when a message is "displayed".

After message 5, in the note, the %autonumber% is still 5.

I don't be sure that a bug. It depends how we interpret this.

@PlantumlTeam: is this a bug or not?
commented Mar 8, 2023 by Goczilla1990 (140 points)
Ok I see. So, a workaround could be to create a hidden message to increment the number and use it in a note. Let's see is someone else has a better idea :D. Anyhow, thank you for your answer.