Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

access to filename

0 votes

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
 

asked Jun 26 in Wanted features by boshka (1,150 points)
edited Jun 26 by boshka

1 Answer

0 votes

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)

answered Jun 28 by plantuml (126,850 points)
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
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 :-)
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...