|
[Sponsors] |
December 21, 2016, 01:39 |
Scripting
|
#1 |
New Member
Talay
Join Date: Nov 2010
Posts: 6
Rep Power: 15 |
Hi,
I am trying to access a body in meshing via scripting however I am a bit confused about the idea of partID and TopoID. I am currently using a loop like; Code:
var partID = new Array (); var TopoId = new Array (); SM.Clear(); SM.SelectAll(); for (var i= 1; i<=SM.SelectedCount; i++) { partID[i] = DS.SelectionManager.SelectedPartID(i); TopoId[i] = DS.SelectionManager.SelectedEntityTopoID(i); } The main goal is to sort the contents of PrototypeGroup according to bodies (surface or body). And select either one at specific locations. I also did try; Code:
var part = DS.Tree.FirstActiveBranch.PrototypeGroup.Prototypes(1).Part; var partID = part.ID; var brep = part.BRep; var face = brep.Cells(1); So I need a bit of guidance here.. |
|
December 21, 2016, 05:41 |
Solution
|
#2 |
New Member
Talay
Join Date: Nov 2010
Posts: 6
Rep Power: 15 |
Hi,
Let me answer my own question.. Code:
var branch = DS.Tree.FirstActiveBranch; var bodies = branch.Prototypes; for (var i=1; i<=bodies.Count; i++) { SM.Clear(); SM.ForceSelect(bodies(i).Part.ID, bodies(i).topoID); } |
|
Tags |
mesh script access body |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] ICEM Scripting Issues | tylerplowright | ANSYS Meshing & Geometry | 33 | September 27, 2021 16:35 |
Macro scripting in netbeans, importing star libraries | laurensvd | STAR-CCM+ | 3 | October 31, 2020 22:06 |
Glyph Scripting Origin | pdp.aero | Pointwise & Gridgen | 3 | July 9, 2015 16:57 |
record actions via scripting | Marabelle | ANSYS | 0 | July 31, 2013 11:57 |
[DesignModeler] change import by scripting | dragonwei | ANSYS Meshing & Geometry | 0 | September 17, 2012 05:08 |