Problem using PlantUML_Template_v27.dotm - please help?

0 votes
asked Sep 26, 2014 in Bug by anonymous
Placed PlantUML_Template_v27.dotm and plantuml.jar (8008) per directions.  Defined environment variable GRAPHVIZ_DOT.  Ran "java -jar plantuml.jar -testdot" in %appdata%, got expected results - installation OK file generation OK.

Click Preferences in the PlantUML ribbon, no path to graphviz.  Attempt to render any plantuml input sequence, get a dialog box stating "Java command execution failed (break key?)".  CLick OK, and a visual basic dialog box appears stating "run-time error '3': return without GoSub".  I can't reliably get into the macro debugger (not sure why) but when I do, I see a return statement highlighed, somewhere in the immediate vicinity of the call out to plantuml and dot.

I was coerced into shifting from an earlier verison of Office to 2010, and had to reinstall PlantUML to make it all work.  I desperately need it; please let me know how I can help with this.
commented Oct 24, 2016 by anonymous
I modified the macros this way:
- Added a new function 'Environ()':
    Function Environ(space As String, var As String) As String
        Set wshShell = CreateObject("WScript.Shell")
        Set wshSystemEnv = wshShell.Environment(space)
        Environ = wshSystemEnv(var)
    End Function
- Modified 'getDotPath()'
    Function getDotPath() As String
        getDotPath = Environ("SYSTEM", "GRAPHVIZ_DOT")
    End Function

2 Answers

0 votes
answered Apr 13, 2015 by anonymous

I had a similar issue. I don't propose this as a solution. Someone who actually understands the system should do that.  What I did was change the code so that java command had a full pathname (53 as I understand it indicates that I cannot find the thing it is supposed to be executing)

            JavaCommand = "c:\Program Files\Java\jdk1.7.0_67\bin\java.exe " & javaoptions _
After that it worked fine.
Given that this fixed the problem for me: what was the real cause of the problem? I would presume that the original code was fine and that I have a setup issue somewhere at fault, but those things are a royal nuisance to deal with. This was easier for me that wading through all those setups (I don't know I can even account for many of them).
0 votes
answered Apr 24, 2023 by anonymous
I had the same issue.
It seems that the java.exe binary was not found.
I solved it when I added %JAVA_HOME%\bin to my user path (see environment variables).