Ansys Learning Forum Forums Installation and Licensing Ansys Free Student Software JavaScript Runtime Error in AQWA Pre on Windows 11 (Version 24H2) Reply To: JavaScript Runtime Error in AQWA Pre on Windows 11 (Version 24H2)

Mike Pettit
Ansys Employee

Hello,

To start, please can you tell me which version of the Ansys software you are using?

You are correct that the problem also occurs when we open the Mesh component, which is using the Ansys Mechanical editor. However, you need to modify a different file to those I mentioned in my previous post: the relevant file here is C:\Program Files\ANSYS Inc\v242\aisol\DesignSpace\DSPages\scripts\DSTreeScript.js (change 'v242' to your installed version as necessary).

The Script Error dialog box tells you which line needs to be modified; follow these instructions if you want to try and fix the problem for yourself. Check that the script error is a 'Type mismatch' - these instructions are not relevant for other kinds of error. Finally, do not try to modify your install if you do not understand these instructions clearly!

  • Close the Mesh editor.
  • Navigate to C:\Program Files\ANSYS Inc\v242\aisol\DesignSpace\DSPages\scripts, and create a back-up copy of DSTreeScript.js before you make any changes to the file.
  • Open DSTreeScript.js with a text editor, and search for the line of code which appears in the 'Script:' section of the Script Error dialog box. For example, if the script error refers to:
g_UIHandler.TreeHandler.RemoveAndFillChildNodes(parentNode)

then I might search for 'RemoveAndFillChildNodes' in DSTreeScript.js.

  • Before this line in DSTreeScript.js, add a new line with the text 'if ([word in brackets] != null)'. For example: if the Script Error refers to
    g_UIHandler.TreeHandler.RemoveAndFillChildNodes(parentNode)

    Then the line you add in should read (in bold):

    if (parentNode != null)
    g_UIHandler.TreeHandler.RemoveAndFillChildNodes(parentNode)

     

  • Save the file, then re-open the Mesh editor to see if the problem goes away.

Please reply on this thread if you cannot find the referred line of code in DSTreeScript.js - if you are using an older version of Ansys the problem may occur in other places. Let me know if you run into any other issues.

Mike

Â