How to retrieve the renamed "Set name" by hm_entityinfo without exporting the file?
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
-
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=solvernameRegards,
Fred.2
Answers
-
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=solvernameRegards,
Fred.2 -
Frederic Juras_21782 said:
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=solvernameRegards,
Fred.Hey Fred,
That helps alot! Thank you for sharing such valuable info!
Regards,
Thirukumaran
0 -
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.
0 -
Thirukumaran Subbian said:
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
1 -
Ben Buchanan said:
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
0 -
Thirukumaran Subbian said:
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
1 -
Ben Buchanan said:
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
1 -
Ben Buchanan said:
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.
0