Is there a way to get the component name from the component ID?

Logan_21859
Logan_21859 New Altair Community Member
edited October 2020 in Community Q&A

I am currently writing a macro where I would like to query a particular surface for its component ID, and then use the component ID to store the component name as a string so I can actively update the current component, my code in question is as follows:

 

foreach i $surfID2 {

    *createmark surfaces 1 [lindex $surfID2 $surfnum]
    set curComp [hm_getmark comps 1]
    #*currentcollector components $curComp

...

}

 

As it is right now, it only stores the component ID in curComp, so I would like to now if there's another command or query I could use to store the component's name in curComp instead. Thanks.

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited February 2019

    Use hm_getcollectorname