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

[DesignModeler] Design Modeler: Deleting Features with Script Commands

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2019, 11:47
Default Design Modeler: Deleting Features with Script Commands
  #1
New Member
 
Andrew M
Join Date: Apr 2018
Location: Toronto
Posts: 18
Rep Power: 3
michal28 is on a distinguished road
Hi Guys,

So I've been stuck on this problem for a while and am having no luck getting past it so far.

Specifically, I am looking for a way to DELETE a feature after I've created it via DM script commands?

For example, I currently have a script to create a BOOLEAN feature to combine two bodies using the command "var NewBoolean= ag.gui.CreateBoolean()" and the corresponding example code shown below.

"
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()


"
However in my automated process I would like to be able to select and delete this (and other) defined functions so that I can create a new one.

I have done alot of reading through the forums which lead me to the helpful file agEventHandler.js where I have found the commands "agTreeDeleteSelectedFeature(0)"; and "agDelete(0)"; but so far these only seems to give me syntax and object errors.

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

Reply

Tags
delete, design modeler, features, scripting

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
Ansys Design modeler subtraction natantyt ANSYS Meshing & Geometry 5 February 11, 2017 22:02
[DesignModeler] Rotating an imported part in Design Modeler mikko ANSYS Meshing & Geometry 2 November 30, 2015 00:23
design modeler zikozaki01 FLUENT 4 May 30, 2012 17:17
Design Modeler crash LR CFX 3 May 13, 2005 19:52
Info: Short Course On Thermal Design of Electronic Equipment Arnold Free Main CFD Forum 0 August 10, 1999 10:18


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