Search code examples
visual-studio-codeenvironment-variablesplantuml

vscode and plantuml 2.11.1 fails to include files specified by environmental variables


Using vscode for plantuml, the latest PlantUML extension version, 2.11.1, seems to break generation of diagrams specifically when including files with environment variables. And it works when we downgrade the extension version to 2.11.0.

Example plantuml code:

@startuml
!include %HOME%/plantuml_macros/stdmacros.txt

title ABCDXXXX
---

Error in preview diagram is:enter image description here

How can I use environmental variables in include path in plantuml 2.11.1 ? Thanks in advance.


Solution

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

    Could you try this way :

    !include %getenv("HOME")/plantuml_macros/stdmacros.txt
    

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