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 Members List Search Today's Posts Mark Forums Read

Like Tree11Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2016, 06:39
Default
  #41
New Member
 
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 4
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, 07:02
Smile
  #42
New Member
 
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 4
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, 20:33
Default
  #43
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 9
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, 09:31
Default
  #44
New Member
 
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 4
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, 13 views)
Allen Latt is offline   Reply With Quote

Old   September 5, 2016, 10:31
Smile
  #45
New Member
 
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 4
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, 19:56
Default
  #46
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 9
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, 22: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, 22:52
Default
  #48
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 9
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, 04:12
Default
  #49
New Member
 
Paul
Join Date: Apr 2012
Posts: 27
Rep Power: 9
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, 11:27
Default
  #50
New Member
 
Andrew M
Join Date: Apr 2018
Location: Toronto
Posts: 18
Rep Power: 3
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 14:06.
michal28 is offline   Reply With Quote

Old   April 17, 2019, 13:50
Default
  #51
New Member
 
Andrew M
Join Date: Apr 2018
Location: Toronto
Posts: 18
Rep Power: 3
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

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] ICEM Scripting Issues tylerplowright ANSYS Meshing & Geometry 26 Yesterday 10:55
Physical size of geometry in DesignModeler Michael Rasmussen CFX 9 June 16, 2017 03:27
Rotor 67 full compressor geometry jf Main CFD Forum 1 May 26, 2015 10:48
[DesignModeler] find features of Gambit in DesignModeler code_source ANSYS Meshing & Geometry 13 April 30, 2014 07:33
[Other] exchange of parameter values between TurboGrid and DesignModeler in Workbench la7low ANSYS Meshing & Geometry 2 February 21, 2011 15:12


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