🎉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 Can I get the Solver Keywords with Hypermesh Tcl Script?

User: "Jason_21458"
Altair Community Member
Updated by Jason_21458

Hi Altair,

I want to get the keywords list after I import the model into Hypermesh with Tcl scripts, because I found some strange keywords exist in my model. 

I didn't find the relative scripts in hyperworks help web.

I found only  "set keyword [hm_getvalue $entType id=$Id dataname=solverkeyword]" from the help document. But it's inconvenient.

I thought there must have a code to get all keywords list out.

Could you give me the feedback?

Thanks!

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    The following isn't great because it could take a long time if you have many elements but it does get you what you want.

    hm_createmark elements 1 "advanced" "all"
    set keywordList [lsort -unique [hm_getvalue element mark=1 dataname=solverkeyword]]

     

    User: "Jason_21458"
    Altair Community Member
    OP
    Updated by Jason_21458

    The following isn't great because it could take a long time if you have many elements but it does get you what you want.

    hm_createmark elements 1 "advanced" "all"
    set keywordList [lsort -unique [hm_getvalue element mark=1 dataname=solverkeyword]]

     

    Hi Buchanan,

    Thank you for your quickly reply, but I'm not only want to get elements keyword. I want get all solver keywords like parts, sets, sections, mats and etc. 

    When Hypermesh parse the model, it mush have read the and stored the keywords in some place.

    User: "Ben Buchanan"
    Altair Employee
    Updated by Ben Buchanan

    Hi Buchanan,

    Thank you for your quickly reply, but I'm not only want to get elements keyword. I want get all solver keywords like parts, sets, sections, mats and etc. 

    When Hypermesh parse the model, it mush have read the and stored the keywords in some place.

    You should be able to loop through the other entity types something like this:

    hm_createmark $entityType 1 "advanced" "all"
    set keywordList [lsort -unique [hm_getvalue $entityType mark=1 dataname=solverkeyword]]

    but Yes I agree, seems like there should be an easier way but I couldn't find it either.

    User: "Akash Purushothaman"
    Altair Community Member
    Updated by Akash Purushothaman

    is there an equivalent code for hypermesh 2019??

    the dataname solverkeyword is not available in 2019

    I use hm_getvalue sets id=1 dataname=solverkeyword
    this works for versions 2021 and above.. but not for 2019. so is there a code to get solver keyword for sets?