🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

how to select solid to edit it

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

I'm new to TCL scripting, and I'm looking for a way to select a solid by its location.  I looked into *createmark with the 'by box'/'by cylinder' option, but they don't work for solids. 

 

'This is currently supported for nodes, elements, connectors, components (FE and connectors only), loads, equations, loadcols, systems, systcols, vectors, vectorcols, blocks, groups, sets and contactsurfs' - from Altair 14.0 documentation

 

I would also use the same method to find surfaces to edit solids. 

 

Can somebody help with this? 

 

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    I found another post that asked basically the same question (

     using hm_measureshortestdistance2 works, I just need to figure out how to call the entity_id that it returns.

     

    for example, I created a mark of all my solids *createmark solids 2 1-1000

     

    then I measured the distance between a node at (0 76 81) and all my solids with hm_measureshortestdistance2 0 76 81 solids 2 0 0

     

    I get the following:

    0 0 0 0 44 0 76 81

     

    my solid id is 44, but how do I extract it?

     

    Thank you

     

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi

     

    You can get the solid id in the variable 'id' as following:

     set id [lindex [hm_measureshortestdistance2 0 76 81 solids 2 0 0] 4]

    or

     lassign [hm_measureshortestdistance2 0 76 81 solids 2 0 0] d dx dy dz id

    Hope it helps.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi

     

    You can get the solid id in the variable 'id' as following:

      set id [lindex [hm_measureshortestdistance2 0 76 81 solids 2 0 0] 4]

    or

      lassign [hm_measureshortestdistance2 0 76 81 solids 2 0 0] d dx dy dz id

    Hope it helps.

     

    Thank you, akitoguc, that is cleaner code than what i had.  I had two extra lines to achieve the same thing.  

     

    I appreciate your time and help.