CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS (https://www.cfd-online.com/Forums/ansys/)
-   -   [Designmodeler] Scripting-how to name: counting edges, NamedSelection, .. (https://www.cfd-online.com/Forums/ansys/153205-designmodeler-scripting-how-name-counting-edges-namedselection.html)

USER1234 May 20, 2015 08:56

[Designmodeler] Scripting-how to name: counting edges, NamedSelection, ..
 
Hi,

does anybody know how to script counting edges, NamedSelections, Lines, ... in a "for-loop". I could only find an example for counting bodies but I couldn't transfer the scripting to others.

Example for bodies:
Code:

for (var i = 0; i < ag.fm.BodyCount; i++)
{
    var f1=ag.fm.body(i);
    f1.Name = "Line_Body_"+f1.PartID
}
agb.Regen();

For example this Code doesn't work with "...ag.fm.NamedSelCount;..".

Best regards
Max


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