I'd like to include blocks of code from a file into itself, without having to specify the actual file name.
I want to keep a single file with several diagrams, all using a few common macros. What I have so far is something like this in my diagrams.txt file:
@startuml(id=MACROS)
/'my macros'/
@enduml
@startuml
!include diagrams.txt!MACROS
/' my diagram'/
@enduml
/'a bunch more diagrams, similar to above block'/
This works great, however, the !include relies on knowing the file name...is there a way to specify "current file"? If not, would you consider adding such a feature?
The file name is usually known, but when I embed the file in a word document and double click on it, word generates a temporary file. I don't want to have to change the name in my include directives to match the temporary file name.
Also as a hack, I have to add a title to the empty diagram (the one containing only macros) to avoid an error.