πŸŽ‰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

change entity type of mark in tcl like in gui

User: "IsabellaR"
Altair Community Member
Updated by IsabellaR

Hi,

in the Hypermesh GUI, it is a very useful feature that when I select several items of one entity type (i.e. several parts) I can click the downwards arrow on the selection bar and change the entity type (i.e. to solids). Then, the selection changes to all solids that are part of the parts I selected previously. Is there a command in tcl I can use to cause the same behavior for marks in tcl?
I.e. if I want extract from
*createmark modules 1 $myPartID
all solids contained within this mark 1 (resp. the part with id $myPartID) without having to navigate from parts to components to solids step by step?

Thanks!

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Michael Herve"
    Altair Employee
    Accepted Answer

    Hello @IsabellaR,

    one of my colleague share this peice of code with me:

    proc GetCompsByPartAssembly {partAssemblyId} {

        set compIdList ""

        foreach partId  [hm_me_childrenget $partAssemblyId] {

              #if {[hm_getvalue parts id=$partId dataname=structural_type]!="Part"} {continue};# not needed

                set compIdList [concat $compIdList [hm_me_entitiesget $partId comps]]

          }

          return $compIdList

    }

    Can you please test it?

    Regards,

    Michael