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

[DesignModeler] Scripting suppression of Features in DesignModeler

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2015, 23:26
Default
  #21
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
Hi Mizor,

Use boolean function to unite two bodies

Code:
var fBoolean = ag.gui.CreateBoolean();
fBoolean.Operation = 1;
Do named selection for target and tool bodies and select then like this

Code:
ag.listview.ActivateItem("Tool Bodies");
ag.bodyPick;
agb.AddSelect(agc.TypeBody, namedselection1);
ag.listview.ItemValue = "Apply";
ag.listview.ActivateItem("Target Bodies");
ag.bodyPick;
agb.AddSelect(agc.TypeBody, namedselection2);
ag.listview.ItemValue = "Apply";
ag.b.Regen();

Hope it helps

cheers
KAPI
Kapi is offline   Reply With Quote

Old   August 24, 2016, 07:49
Default
  #22
New Member
 
Harry Eggo
Join Date: Feb 2016
Posts: 10
Rep Power: 10
harry94 is on a distinguished road
Encountered a problem with this. I'm trying to import lots of different curves so have scripted matlab to generate a script to be imported.

When I follow the format:

var NL1 = ag.gui.CreateCurve();
NL1.Name = "Name";
NL1.CoordinateFile = "FilePath";
agb.Regen();
var NL2 = ag.gui.CreateCurve();
NL2.Name = "Name";
NL2.CoordinateFile = "FilePath";
agb.Regen();
var NL3 = ag.gui.CreateCurve();
NL3.Name = "Name";
NL3.CoordinateFile = "FilePath";
agb.Regen();
...

I find that the first coordinate file is imported correctly but the rest are not. The error seems to be that Design Modeler is trying to do the following imports as point selections rather than coordinate files.

Is there any line of code I could use that would define the curve type as 'From Coordinate File'.

EDIT: Have no idea what happened but now Design Modeler is happy with my input and it's all working fine.

Last edited by harry94; August 24, 2016 at 07:54. Reason: Problem Fixed
harry94 is offline   Reply With Quote

Old   October 1, 2018, 16:51
Default Body supression
  #23
New Member
 
John DeHart
Join Date: Sep 2018
Posts: 2
Rep Power: 0
Enginetix is on a distinguished road
Did anyone figure out how to properly suppress a body in design modeler? I'm reviewing the event handler script but the function format is not readily available.
Enginetix 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
[DesignModeler] DesignModeler Scripting: How to get Full Command Access ANT ANSYS Meshing & Geometry 53 February 16, 2020 16:13
[DesignModeler] Designmodeler java scripting Herbert2014 ANSYS Meshing & Geometry 13 October 16, 2019 17:19
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
[DesignModeler] change import by scripting dragonwei ANSYS Meshing & Geometry 0 September 17, 2012 06:08


All times are GMT -4. The time now is 16:28.