Plantuml & vscode : Cannot include files with environment variables

0 votes
asked 5 days ago in Question / help by anonymous

Hi

The latest PlantUML extension 2.11.1,when used with vscode, breaks the generation of diagrams specifically when including files with environment variables

@startuml
include %MACRO_FILE%

!include %HOME%/plantuml/macros.txt

The following error is seen

cannot include %MACRO_FILE%
Some diagram description contains errors

1 Answer

0 votes
answered 5 days ago by plantuml (203,680 points)

The preprocessor has been changed with last version (see http://plantuml.com/preprocessing )

Could you try this way :

!include %getenv("MACRO_FILE")
!include %getenv("HOME")/plantuml/macros.txt

And tell us if it's working this way. Thanks

commented 2 days ago by anonymous
The suggested way works.

Thank you.
...