Create an "Part id"array of plenty of parts

Yu-Ju Chen_20500
Yu-Ju Chen_20500 Altair Community Member
edited October 2020 in Community Q&A

As title,

I have plenty of parts and I would like to save their part id into an array.

The begining of my script will be :

*createmark comps 'displayed'

 

I have no idea to get the components' id of this group of parts.

Then I don't know how to save them into an array by '*createarray' script for the further step.

Can anyone help?

 

Answers

  • Pandurang
    Pandurang Altair Community Member
    edited July 2019

    you can save that in variable..then use it later in script

     

    *createmark comps 1 'displayed'

    set part_ids [hm_getmark comps 1]

  • Yu-Ju Chen_20500
    Yu-Ju Chen_20500 Altair Community Member
    edited July 2019

    you can save that in variable..then use it later in script

     

    *createmark comps 1 'displayed'

    set part_ids [hm_getmark comps 1]

    Hi, Pandurang,

    Thanks for your helpful suggestion