[DesignModeler] error when running the *.js script file?
Hi,
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)
Answers
-
The error message says line 0, character 1, is invalid. You might want to check for any any white space or characters that might not be the letter "a" (i.e. agb) in the file. agb.Regen() is the right command to Generate in DM (if you're using File > Run Script (with a .js file)).
In the ACT console context, you can use the python command to do the same:
Ansys.ACT.DesignModeler.APIConfig.AgApplet.BatchMgr.Regen()The attached zip file contains an example on how to swap out an import geometry file through a .js script.
0