TAGGED: ansys-designmodeler, JavaScript-Error, scripting
- 
		
			- 
January 29, 2025 at 6:54 ame.bakhtyary SubscriberHi, 
 I'm a newbie to DM scripting. I'm doing an optimization project over a blade and need to update the computational domain in a specified interval. Only one single curve (the blade profile) must be re-imported from a new coordinate file.
 As far as I know, I only need to put this line in a free *.js file:agb.Regen();However, when I ran the file, I got this error:  What should I do? Any ideas would be greatly appreciated. (Note: SpaceClaim is not gonna work for me, because I'm meshing in 2D, and SpaceClaim doesn't preserve the blade curve when it sends the geometry to the Ansys Meshing, so the mesh cannot capture the curvature appropriately) 
- 
February 6, 2025 at 1:28 pmGary_S Ansys EmployeeIt looks as if the .js file was not editied in an ASCII Text editor. 
 Try creating a new .js file using Notepad.
- 
February 6, 2025 at 1:57 pm
- 
February 6, 2025 at 9:03 pmGary_S Ansys EmployeeÂYou have to select the node first. The following example is an Import feature, but may work for CurveÂJscript:ÂÂvar NodeName = "Import1"; // Name of the import featureÂ// Loop through the existing features and select the required onevar count = ag.fm.FeatureCount;for (var i =0; i < count; i++) {ÂÂ Â var current = ag.fm.feature(i);Â Â var Name = current.Name;ÂÂ Â if (Name.toLowerCase() == NodeName.toLowerCase()) { // found the matchcurrent.Refresh = 1; // Refresh the Geometrybreak;Â Â }}agb.regen();ÂÂ 
- 
February 6, 2025 at 9:21 pme.bakhtyary SubscriberThank you so much for your time. All the best. 
 
- 
- The topic ‘Error running a DesignModeler script (*.js)?’ is closed to new replies.
- Project lines/edges into a face with the direction normal to the face
- No preview in explorer with scdox file
- Script for subtracting models
- Multiple Instances of SpaceClaim taking multiple licenses
- Issues after installing new service pack 2024R1 (sp5)
- Spaceclaim file reference error
- Add-in Error Excel
- Problems with loading my Discovery Mesh into Fluent
- Missing SubDivWrapper.dll
- Fileformats
- 
                        
                        4167
- 
                        
                        1487
- 
                        
                        1363
- 
                        
                        1194
- 
                        
                        1021
© 2025 Copyright ANSYS, Inc. All rights reserved.

 You are navigating away from the AIS Discovery experience
You are navigating away from the AIS Discovery experience 
               
          