Hello,
Is it possible to access to the diagram name from the pre-processor ?
@startuml my_diagram_name
In my example, I would like to get the "my_diagram_name" value
Thanks !
(--------)
It depends on which plugin you are using, but %filename() may work in some situation.
Tell us if it's working for you, and if it does not, tell us more about your config !
I'm using it through VS Code, and the %filename() returns the actual filename of the .puml file.
As we can have mutliple diagrams in a single file, it would be great to have access to the diagram name
Hello N. and Plantuml team,
Yes, a good example, adaped from:
will be perhaps a file named 'global_filename.pu' with 3 sections:
@startuml my_diagram_name :filename: "%filename()"; :filenameNoExtension: "%filenameNoExtension()"; @enduml @startuml BobAndAlice Bob -> Alice : hello from "%filename()" @enduml @startuml JohnAndJane.svg John -> Jane : hello from filename: "%filename()" and filenameNoExtension: "%filenameNoExtension()" @enduml
And the result are 3 PNG files:
Then:
Could you confirm @plantuml?
Thank @plantuml for your works,If that can help,Regards,Th.