Installation & Licensing Center
ERROR - JavaScript runtime error Line 57741
Authored by Aaron Schedlin
February 14th, 2025
102 views
0 likes
KB3067442
ERROR
A script error similar to the one shown below occurs whenever you import geometry into Ansys Workbench’s Mechanical application.

SCript Error
Line: 57741
Char: 8
Error: Type mismatch
Code: 800a00d
Source: JavaScript runtime error
Script:
g_UIHandler.TreeHandler.RemoveAndFillChildNodes(parentNode);
Software & Version
Workbench 2023R2, 2024R1, 2024R2, 2025R1
*This example was taken from this version but is not necessarily limited to this version.
Description/Cause
It appears that this problem occurs in newer Windows 11 versions, such as 24H2 OS Build 26100.2605. The geometry format doesn't matter, and we have seen the issue in 2023R2, 2024R1, 2024R2, and 2025R1. If you press OK and then close and re-launch Mechanical, you can continue with the imported geometry. We recommend saving the project at this point.
*The cause(s)/solution(s) we identified in this documented instance may not be the only cause(s)/solution(s) for this error.
Solution
Versions 2023R2 and newer
1. Exit all Workbench sessions.
2. Download the appropriate script file for the version that you’re using (for example, DSTreeScript.v242.txt for version 2024R2).
3. Rename the file to DSTreeScript.js.
4. Replace the existing DSTreeScript.js file located in C:\Program Files\ANSYS Inc\vNNN\aisol\DesignSpace\DSPages\scripts with the one from the previous step. Note that you may need administrative privileges for this operation.
Versions 2023R1 and older
1. Exit all Workbench sessions.
2. Make a backup copy of the file C:\Program Files\ANSYS Inc\vNNN\aisol\DesignSpace\DSPages\scripts\DSTreeScript.js.
3. Launch a text editor in administrator mode and open the file C:\Program Files\ANSYS Inc\vNNN\aisol\DesignSpace\DSPages\scripts\DSTreeScript.js.
4. Locate the function removeAndFillChildNodes(parentNode).
5. Make the following modification.
Change:
if (g_UIHandler.TreeHandler != null)
<line of code>
to:
if (g_UIHandler.TreeHandler != null)
if (parentNode != null)
<line of code>
(As is evident, you are adding one more if-test. Pay attention to the indentation.)
6. Repeat step 5 for the following functions:
· function removeAndFillChildNodesWithoutClick(parentNode)
· function addNodeAndChildren(dsObj, parentNode)
· function recursiveAddNodeAndChildren(dsObjToAdd, parentNode, tvwRelationship)
· function updateCollectionState(collection)
· function ChangeState(node, state)
· function expandEngineeringDataGroup(project)
7. Save and exit the text editor.