access to filename

0 votes
asked Jun 26 in Wanted features by boshka (1,320 points)
edited Jun 26 by boshka

Hello!


Q1: Am I able to access the output filename (without extention) inside the @startuml?

 

Q2: Why this does result in the full file name?

@startuml test.svg
     note right: %filename%
@enduml
 

1 Answer

0 votes
answered Jun 28 by plantuml (134,570 points)

Q1: With last beta https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0

you can have:

@startuml foo.png
     note right: %filename%
     note left: %filenameNoExtension%
@enduml

Q2: Not sure to understand the question. This is simply our decision (see http://plantuml.com/preprocessing )

(Note that this is not working with the online server http://www.plantuml.com/plantuml because there are no "filename" in that case)

commented Jun 28 by boshka (1,320 points)
edited Jun 28 by boshka
Q2 - sorry, it should sound like:
Why this does NOT result in the full file name?

Note: it does not work even in case there is file name (that is, with Eclipse plugin). Can't it simply take the name from the @startuml <filename> line?

UPD: I checked with standalone jar and still the image is generated with %filename% note, not with the real file name in the note
commented Jun 29 by plantuml (134,570 points)
Before talking about Eclipse, we should first fix the issue using the standalone jar. Could you give us the exact command line you are using ? It seems to work on our side, so we are confused :-)
commented 10 hours ago by luclaf (100 points)
Hello,
I have the same problem with both %filename% and %filenameNoExtension% when put in the Title.
I use VS Code with the following settings
"plantuml.jar": "D:\\Apps\\PlantUML\\plantuml.1.2017.18.jar",
commented 10 hours ago by plantuml (134,570 points)
About VS Code, I think the issue comes from the integration between VS Code and PlantUML.  %filename% works with PlantUML command line.
You should explain this issue to the author of the VS Code PlantUML plugin and show him this thread. We would be glad to help him to implements this, but we have to work together on the subject.
...