TAGGED: ansys-designmodeler, JavaScript-Error, scripting
-
-
January 29, 2025 at 6:54 am
e.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 pm
Gary Stofan
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 pm
Gary Stofan
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 pm
e.bakhtyary
SubscriberThank you so much for your time.
All the best.
-
- The topic ‘Error running a DesignModeler script (*.js)?’ is closed to new replies.
- Unable to attach geometry 2024 R2
- Data Center Simulation
- [SpaceClaim] STEP file size using Converter.exe
- Ansys SpaceClaim and Discovery 2024 Facet shelling bug – 2022 version is better
- Spaceclaim 2024 error FNE activation failed
- Ansys Discovery Crashing vGPU (Reproducible)
- How to do the snap fit insertion FEA?
- PMI Product manufacturing information in SpaceClaim/Discovery modeling
-
2537
-
933
-
787
-
599
-
591
© 2025 Copyright ANSYS, Inc. All rights reserved.