|
[Sponsors] |
[DesignModeler] DesignModeler Scripting: How to get Full Command Access |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#41 |
New Member
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 10 ![]() |
Thank you so much Kapi
that works well ![]() |
|
![]() |
![]() |
![]() |
![]() |
#42 |
New Member
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 10 ![]() |
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, |
|
![]() |
![]() |
![]() |
![]() |
#43 |
Senior Member
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14 ![]() |
not sure how to replace it even manually.
Unless you delete that file and import the new one. How would you do it manually? |
|
![]() |
![]() |
![]() |
![]() |
#44 |
New Member
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 10 ![]() |
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 ![]() ![]() |
|
![]() |
![]() |
![]() |
![]() |
#45 |
New Member
Aung Ko Latt
Join Date: Jul 2016
Location: Germany
Posts: 12
Rep Power: 10 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#46 |
Senior Member
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14 ![]() |
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! |
|
![]() |
![]() |
![]() |
![]() |
#47 |
New Member
Timothy Acosta
Join Date: Sep 2016
Posts: 1
Rep Power: 0 ![]() |
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? |
|
![]() |
![]() |
![]() |
![]() |
#48 |
Senior Member
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#49 |
New Member
Paul
Join Date: Apr 2012
Posts: 27
Rep Power: 14 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#50 |
New Member
Andrew M
Join Date: Apr 2018
Location: Toronto
Posts: 18
Rep Power: 8 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#51 |
New Member
Andrew M
Join Date: Apr 2018
Location: Toronto
Posts: 18
Rep Power: 8 ![]() |
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? |
|
![]() |
![]() |
![]() |
![]() |
#52 |
Member
Dimitrios S. P.
Join Date: Jan 2018
Posts: 63
Rep Power: 8 ![]() |
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" |
|
![]() |
![]() |
![]() |
![]() |
#53 |
New Member
Pavel
Join Date: Dec 2019
Posts: 1
Rep Power: 0 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#54 |
New Member
Kikurato
Join Date: Feb 2020
Posts: 1
Rep Power: 0 ![]() |
I'm sorry, do not tell
How can I create a name selection for a body plane in jscript |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rotor 67 full compressor geometry | jf | Main CFD Forum | 3 | January 28, 2024 05:14 |
[ICEM] ICEM Scripting Issues | tylerplowright | ANSYS Meshing & Geometry | 33 | September 27, 2021 16:35 |
Physical size of geometry in DesignModeler | Michael Rasmussen | CFX | 9 | June 16, 2017 03:27 |
[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 |