CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > ANSYS Meshing & Geometry

[DesignModeler] DesignModeler Scripting: How to get Full Command Access

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2016, 07:39
Default
  #41
New Member
 
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 10
Allen Latt is on a distinguished road
Thank you so much Kapi
that works well
Allen Latt is offline   Reply With Quote

Old   August 26, 2016, 08:02
Smile
  #42
New Member
 
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 10
Allen Latt is on a distinguished road
Dear mates,

Thanks for your guidance and help!

Now I have already done for python vs excel and bla bla.

now i stuck in one place.

In Design Modeller of my workbench workflow, I imported one geometry (in .igs file format) and then I finished editing and done.

Now I would like to replace that geometry with another geometry (in .igs file format) in Design Modeller. What command lines in JScript should I use to do it ? and how?

Thanks for giving time to read my message!

Best Regards,
Allen Latt is offline   Reply With Quote

Old   August 31, 2016, 21:33
Default
  #43
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
not sure how to replace it even manually.
Unless you delete that file and import the new one.

How would you do it manually?
Kapi is offline   Reply With Quote

Old   September 5, 2016, 10:31
Default
  #44
New Member
 
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 10
Allen Latt is on a distinguished road
Dear Kapi,

According to Wasabi post on another thread, we can replace another geometry by manually.
Please kindly find the attached photo.
Referring to that photo, you can give another geometry(in another path) in Source and then you have to choose 'Yes' in Refresh option below the box.
And then update the geometry and you will get replaced geometry.
Hope you understand my description.

Best Regards,
Aung Ko Latt
Attached Images
File Type: jpg there.JPG (65.8 KB, 22 views)
Allen Latt is offline   Reply With Quote

Old   September 5, 2016, 11:31
Smile
  #45
New Member
 
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 10
Allen Latt is on a distinguished road
Hello Everyone,

I would like to ask you one thing about CFX-Solver.
I am going to do CFX solving in Linux.
I already got .def file when I finished in CFX setup in Ansys Workbench.
I named that file as 'CFX.def'.

In Linux, I have a folder and I put that CFX.def inside this folder. In that folder, I put another script called 'RUNCFX.pl'. I write code inside that perl 'RUNCFX.pl' script that will use also 'CFX.def' file. I wrote perl script in order to run different(two or three) velocities by using 'CFX.def' file.

By manually, I have to open CFX solver >> Tools >> Command line
in order to run that .pl file. In CFX solver command window, i wrote ' perl RUNCFX.pl'.

That thing is that "is there any batch command in command prompt in Linux to run that RUNCFX.pl file in CFX solver automatically"? in order to neglect by doing manually.

I already read "Command-Line Options and Keywords for cfx5solve". I didn't find out the solution.

Is there someone who knows how to call .pl in CFX in command prompt?

Best Regards,
Aung Ko Latt
Allen Latt is offline   Reply With Quote

Old   September 5, 2016, 20:56
Default
  #46
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
ask CFX question in CFX forum!
dont post multiple unrelated question in same thread.
Start new thread in CFX and post this question thr!



Also, I will try to see what code can help you replace and refresh!
Kapi is offline   Reply With Quote

Old   September 7, 2016, 23:26
Post
  #47
New Member
 
Timothy Acosta
Join Date: Sep 2016
Posts: 1
Rep Power: 0
Aonged is on a distinguished road
Hi There!

I'm currently doing a failure progression where you have to suppress certain bodies when that particular body exceeds a certain pressure. And I'm totally new to Scripting in Design Modeler. Or even JScripts. I've read up on the all the previous post and have opened up the Ans.Modeler.ObjectsCOM.dll library. I found the scripts needed but i don't entirely understand how the inputs are.

[id(0x00000089)]
HRESULT Select3dFace(
[in] int Index,
[in] double xs,
[in] double ys,
[in] double zs,
[out, retval] int* selected);

so I interpret this as.
var Select = agb.Select3dFace(Index,xs,ys,zs);
agb.Regen();
Is this right?

What I basically need to automate is Selecting Certain Bodies then Suppressing them? Could anybody lead me to a clear direction?
Aonged is offline   Reply With Quote

Old   September 7, 2016, 23:52
Default
  #48
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
rather going to the library u went, i would go to ansys script installed on your system to find some functions.
like:
C:\Program Files\ANSYS Inc\v170\aisol\AGP\AGPages\scripts

you will get some idea from it.
First try to go to help section in ansys and see how scripts are created and use them.
Kapi is offline   Reply With Quote

Old   November 17, 2016, 05:12
Default
  #49
New Member
 
Paul
Join Date: Apr 2012
Posts: 27
Rep Power: 14
Delcraft is on a distinguished road
Hello everyone,

It's time to refresh this thread!
Can anyone advise me how can I select faces created as a result of some feature in DM?
For example, I have a blend feature imposed on a sharp edge, and I want to create a NS composed from faces created by this blend feature.

Thanks in advance,

Delcraft
Delcraft is offline   Reply With Quote

Old   April 16, 2019, 12:27
Default
  #50
New Member
 
Andrew M
Join Date: Apr 2018
Location: Toronto
Posts: 18
Rep Power: 8
michal28 is on a distinguished road
Hey Guys,

Does anyone know if there's a way to DELETE a feature after I've created it via DM script commands? For Example:

I have a script to create a BOOLEAN using the command "var NewBoolean= ag.gui.CreateBoolean()" and the corresponding example code shown below. However in my automated process I would like to be able to select and delete this (and other) defined functions.

var NewBoolean= ag.gui.CreateBoolean()
NewBoolean.Name = "Combine Function"
NewBoolean.Operation = 0
ag.listview.ActivateItem("Tool Bodies")
agb.ClearSelections()


body1 = ag.fm.Body(1)
agb.AddSelect(agc.TypeBody, body1)

body2 = ag.fm.Body(2)
agb.AddSelect(agc.TypeBody, body2)


ag.listview.ItemValue = "Apply"

ag.b.Regen()

Last edited by michal28; April 17, 2019 at 15:06.
michal28 is offline   Reply With Quote

Old   April 17, 2019, 14:50
Default
  #51
New Member
 
Andrew M
Join Date: Apr 2018
Location: Toronto
Posts: 18
Rep Power: 8
michal28 is on a distinguished road
Within the agEventHandler.js file I have found commands just as agTreeDeleteSelectedFeature(0); and agDelete(0); but they only seems to give me object errors.

Is anyone familiar with this kind of DM command?
michal28 is offline   Reply With Quote

Old   September 13, 2019, 06:34
Default
  #52
Member
 
Dimitrios S. P.
Join Date: Jan 2018
Posts: 63
Rep Power: 8
Pled is on a distinguished road
Good day everyone,

does anyone know how to open .dll files to inspect objects?
I have tried using visual studio 2017 to open
"C:\Program Files\ANSYS Inc\v181\aisol\bin\winx64\Ans.Modeler.AppletCOM.dl l",
but it responds with the error "has no valid CLR header and cannot be disassembled"
Pled is offline   Reply With Quote

Old   December 20, 2019, 09:03
Default
  #53
New Member
 
Pavel
Join Date: Dec 2019
Posts: 1
Rep Power: 0
eremeevpa is on a distinguished road
Good day everyone,
I am trying to write a Jscript for design modeler which will export created geometry into a .step file. And I got stuck with exporting command. I suppose it must look like ag.gui.Export("C:/work/Geom1.stp"); or ag.b.Export("C:/work/myFile.stp") but they don`t work. I tried to use CreateExport, SaveAs, Save, SaveFile instead of Export but they also don`t work.
I will appreciate any help.
Thank you in advanse.
eremeevpa is offline   Reply With Quote

Old   February 16, 2020, 16:13
Default
  #54
New Member
 
Kikurato
Join Date: Feb 2020
Posts: 1
Rep Power: 0
kikurato is on a distinguished road
I'm sorry, do not tell

How can I create a name selection for a body plane in jscript
kikurato is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rotor 67 full compressor geometry jf Main CFD Forum 3 January 28, 2024 06:14
[ICEM] ICEM Scripting Issues tylerplowright ANSYS Meshing & Geometry 33 September 27, 2021 17:35
Physical size of geometry in DesignModeler Michael Rasmussen CFX 9 June 16, 2017 04:27
[DesignModeler] find features of Gambit in DesignModeler code_source ANSYS Meshing & Geometry 13 April 30, 2014 08:33
[Other] exchange of parameter values between TurboGrid and DesignModeler in Workbench la7low ANSYS Meshing & Geometry 2 February 21, 2011 16:12


All times are GMT -4. The time now is 13:21.