How to set the NETGENDIR variable ?

Help
Karagiosis
2009-03-20
2013-05-27
  • Karagiosis
    Karagiosis
    2009-03-20

    Hello,

    When starting Netgen from the Windows console, I get this error message :

    ----------------------
    Error in Tcl-Script:
    result=
    in line 1

    Make sure to set environment variable NETGENDIR
    ----------------------

    I tried setting the NETGENDIR environment variable to :

    1) D:/Programs/Netgen/netgen/windows/Release
    2) D:/Programs/Netgen/netgen/windows
    3) D:/Programs/Netgen/netgen
    4) D:/Programs/Netgen

    ...but none of this worked.

    How to solve this problem ?

    Should I also run one of the postBuild*.bat files after Netgen compilation ?

    Thanks for any help.

     
    • Solved.

      Contrarily to what is being said in the wiki, on MS Windows the folder with the compiled netgen.exe executable is not
      <active configuration>-bin
      but
      <active configuration>-inst,
      where are also copied the necessary tcl scripts.

      In my case the netgen exectuable to launch is in
      D:\Programs\Netgen\netgen\windows\Release-inst
      So, I used this path to set the NETGENDIR variable.

      Some confusion can come from the fact that netgen.exe also exist in D:\Programs\Netgen\netgen\windows\Release
      (without the "inst" suffix).

      Hope this will help other newbies.

      Julien

       
    • Hi,

      The postBuild script is run automatically by Microsoft Visual C++ once Netgen has been successfully compiled... unless ofcourse, you are not using the Microsoft Visual C++ Solution file provided in the Netgen sources.

      The postBuild script basically copies the generated executable file, as well as all the required tcl script files into the "<configuration>-bin" folder, so that once the paths to the TCL/Tk, Togl, pthreads and Opencascade DLLs have been specified in your Windows PATH environment variable, everything works without any further user intervention.

      Running the netgen.exe file present in the "<configuration>" folder will result in an error, because the Tcl script files will not be found...

      The easiest and least painful solution is to ensure that the compilation and post-build processes run successfully in Microsoft Visual C++.... once this is ensured, running the netgen.exe file in the "<configuration>-bin" folder will give you the Netgen GUI.

      Philippose