How to retrieve the renamed "Set name" by hm_entityinfo without exporting the file?

Thirukumaran
Thirukumaran Altair Community Member
edited April 17 in Community Q&A

Hi,

I am trying to retrieve the set name by id with the command line [hm_entityinfo name sets $id -byid]. I have renamed the sets and trying to obtain the updated names but the command gives out the older set name which was first used. The set name seems to be updated only after "exporting the hmfile" and not while "saving" the same. Is there a way to update the set names without exporting the file. Kindly share your inputs!

Thanks!

Thirukumaran 

Best Answer

  • Fred_Juras
    Fred_Juras
    Altair Employee
    edited April 11 Answer ✓

    Hi Thirukumaran,

    This behavior is intended and necessary for some solver interfaces. For instance, Abaqus is a name-based solver which uses a label (string) to reference entities such as sets, materials, and so on. These strings must be unique for a specific solver keyword, but it is often useful to reuse the same name across different solver keywords. In certain cases, different keywords are mapped to the same HyperMesh entity which prevents them from sharing names. To support this use case, the concept of name pools has been implemented, allowing for duplicate names for the same entity type. This is very similar to the concept of ID pools and duplicate IDs. The name pools are currently supported and enabled by default for sets in the Abaqus solver interface. As a result of this development initiative, two new data names have been introduced across all entities – internalname and solvername

    So in your case, the command hm_entityinfo name sets $id -byid returns the unique internal name.
    If you want to retrieve the solver name, please use this command: hm_getvalue sets id=$id dataname=solvername

    Regards,
    Fred.

Answers

  • Fred_Juras
    Fred_Juras
    Altair Employee
    edited April 11 Answer ✓

    Hi Thirukumaran,

    This behavior is intended and necessary for some solver interfaces. For instance, Abaqus is a name-based solver which uses a label (string) to reference entities such as sets, materials, and so on. These strings must be unique for a specific solver keyword, but it is often useful to reuse the same name across different solver keywords. In certain cases, different keywords are mapped to the same HyperMesh entity which prevents them from sharing names. To support this use case, the concept of name pools has been implemented, allowing for duplicate names for the same entity type. This is very similar to the concept of ID pools and duplicate IDs. The name pools are currently supported and enabled by default for sets in the Abaqus solver interface. As a result of this development initiative, two new data names have been introduced across all entities – internalname and solvername

    So in your case, the command hm_entityinfo name sets $id -byid returns the unique internal name.
    If you want to retrieve the solver name, please use this command: hm_getvalue sets id=$id dataname=solvername

    Regards,
    Fred.

  • Thirukumaran
    Thirukumaran Altair Community Member
    edited April 11

    Hi Thirukumaran,

    This behavior is intended and necessary for some solver interfaces. For instance, Abaqus is a name-based solver which uses a label (string) to reference entities such as sets, materials, and so on. These strings must be unique for a specific solver keyword, but it is often useful to reuse the same name across different solver keywords. In certain cases, different keywords are mapped to the same HyperMesh entity which prevents them from sharing names. To support this use case, the concept of name pools has been implemented, allowing for duplicate names for the same entity type. This is very similar to the concept of ID pools and duplicate IDs. The name pools are currently supported and enabled by default for sets in the Abaqus solver interface. As a result of this development initiative, two new data names have been introduced across all entities – internalname and solvername

    So in your case, the command hm_entityinfo name sets $id -byid returns the unique internal name.
    If you want to retrieve the solver name, please use this command: hm_getvalue sets id=$id dataname=solvername

    Regards,
    Fred.

    Hey Fred,

    That helps alot! Thank you for sharing such valuable info!

    Regards,

    Thirukumaran 

  • Thirukumaran
    Thirukumaran Altair Community Member
    edited April 12

    Hello, 

    I have a follow up for the query for the command line hm_getvalue sets id=$id dataname=solvername, where I have retrieved the renamed setname. But, I am not able to use the command line "*createmark sets 1 $list" with the names I have intended to collect in a list from the hm_getvalue command. Is it possible to retrieve the "internalname" from the "solvername" only.  Kindly share your insights with this regards.

    Thanks,

    Thirukumaran.

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited April 15

    Hello, 

    I have a follow up for the query for the command line hm_getvalue sets id=$id dataname=solvername, where I have retrieved the renamed setname. But, I am not able to use the command line "*createmark sets 1 $list" with the names I have intended to collect in a list from the hm_getvalue command. Is it possible to retrieve the "internalname" from the "solvername" only.  Kindly share your insights with this regards.

    Thanks,

    Thirukumaran.

    To use *createmark with a list you need an eval in the beginning. Like this:

    eval *createmark sets 1 $list

    or you can use hm_createmark like this:

    hm_createmark sets 1 $list

  • Thirukumaran
    Thirukumaran Altair Community Member
    edited April 16

    To use *createmark with a list you need an eval in the beginning. Like this:

    eval *createmark sets 1 $list

    or you can use hm_createmark like this:

    hm_createmark sets 1 $list

    Hey Ben,

    Thanks for your inputs. I have been using "eval *createmark sets 1 $list" as well. It is still returning an empty mark, I feel this is because of the "solvernames" in the list. It is working for "internalnames" in the same list but I need to identify only the solvername and append them into a list to find their ids respectively. Will it work if I can retrieve the internalname from the solvername? If yes, which hm command will be suitable? 

    Regards,

    Thirukumaran 

     

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited April 16

    Hey Ben,

    Thanks for your inputs. I have been using "eval *createmark sets 1 $list" as well. It is still returning an empty mark, I feel this is because of the "solvernames" in the list. It is working for "internalnames" in the same list but I need to identify only the solvername and append them into a list to find their ids respectively. Will it work if I can retrieve the internalname from the solvername? If yes, which hm command will be suitable? 

    Regards,

    Thirukumaran 

     

    Not sure I am following what you are trying to do. Why are the solvernames different from the internalnames? In your original note it looks like you are getting the solvernames from id, why don't you use the the id for the createmark query? createmark doesn't work with solver names. 

    The link below is the help page for hm_getinternalname which will get you the internal name from the solvername that may be what you need:

    https://2023.help.altair.com/2023/hwdesktop/hwd/topics/reference/hm/hm_getinternalname.htm

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited April 16

    Not sure I am following what you are trying to do. Why are the solvernames different from the internalnames? In your original note it looks like you are getting the solvernames from id, why don't you use the the id for the createmark query? createmark doesn't work with solver names. 

    The link below is the help page for hm_getinternalname which will get you the internal name from the solvername that may be what you need:

    https://2023.help.altair.com/2023/hwdesktop/hwd/topics/reference/hm/hm_getinternalname.htm

    hm_entitylist may also be helpful for you:

    https://2023.help.altair.com/2023/hwdesktop/hwd/topics/reference/hm/hm_entitylist.htm

  • Thirukumaran
    Thirukumaran Altair Community Member
    edited April 17

    Not sure I am following what you are trying to do. Why are the solvernames different from the internalnames? In your original note it looks like you are getting the solvernames from id, why don't you use the the id for the createmark query? createmark doesn't work with solver names. 

    The link below is the help page for hm_getinternalname which will get you the internal name from the solvername that may be what you need:

    https://2023.help.altair.com/2023/hwdesktop/hwd/topics/reference/hm/hm_getinternalname.htm

    I have an objective to segregate the sets based on the names given for contacts in Abaqus profile, since I can't differentiate the Main and Secondary contact set segments other than the naming convention. That is why, I cannot use id of the sets directly. hm_getinternalname seems to be a valid command for my objective. 

    Thanks again Ben for your inputs!

    Regards, 

    Thirukumaran.