Name selection in Spaceclaim using script

ramsaran
ramsaran Member Posts: 11
Name Dropper First Comment
**
edited June 26 in Structures

how to give name selection separately like rectangle_porous to all rectangles and circle_porous to all circle in a given design using script in spaceclaim.

anyone, please help

Answers

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 339
    25 Answers 100 Comments 25 Likes First Anniversary
    ✭✭✭✭

    Creating a named selection can easily be recorded in the scripting console. Once you have this recording, the problem seems to be reduced to how to select the individual geometric entities. You will need to decide if you want bodies vs. faces. (not sure if they are distinct bodies or not).

    You could use something like this to loop through all the currently selected items and make distinct NS for each.
    for Entity in Selection.GetActive().Items:
    EntSel = Selection.Create(Entity)
    #Create your NS here with the selection from above.