CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [DesignModeler] 3D Curve (https://www.cfd-online.com/Forums/ansys-meshing/195521-3d-curve.html)

Sama Mohammad November 9, 2017 10:57

3D Curve
 
1 Attachment(s)
Hi all,
I'm trying to write a code for Design Modeler to execute some repetitive steps, one of these steps is to create 3D curve passing by some points in coordinate file and I'm tryin this JS code:
Code:

geometry1.SendCommand( Command = """var Cr1 = ag.gui.CreateCurve();
Cr1.Name = "first";
Cr1.CoordinateFile = "C:/Users/Sama Mohamed/Desktop/sample 3d Crves/3d Curves.txt";
agb.Regen();
""")

But it failed, and I got this alert -shown in image- and I can't find any help about the correct syntax in the design modeler user's guide, So i'll highly appreciate any help :)

Sama Mohammad November 9, 2017 12:23

As an update,
I tried to execute the code through Design Modeler itself without send command as following:
Code:

var cr1 = ag.gui.CreateCurve();
cr1.CoordinateFile="C:/Users/Sama Mohamed/Desktop/sample 3d Crves/3d curves.txt";

And it works fine, but I need to execute it through ANSYS workbench as It's a part of code which will include automation of meshing and also fluent analysis, so how to write it correctly inside "send command"!


All times are GMT -4. The time now is 14:50.