Python script for renumbering the elements and Nodes
Answers
-
import hm
import hm.entities as ent
elems = hm.Collection(model,ent.Element)
model.renumbersolverid(collection=elems,start_id=1,incr_val=1,offset_val=1,offset_flag=0,reserved_1=0,reserved_2=0,reserved_3=0)
nodes = hm.Collection(model,ent.Node)
model.renumbersolverid(collection=nodes,start_id=100,incr_val=1,offset_val=1,offset_flag=0,reserved_1=0,reserved_2=0,reserved_3=0)
3 -
Thank you for the reply Shayan Zhang. If i need to renumber the specific collector elements how can i do it.
0 -
Saravanan R_22056 said:
Thank you for the reply Shayan Zhang. If i need to renumber the specific collector elements how can i do it.
You are welcome Saravanan.
For that purpose, you just need to change the collection instantiation to collect specific elems.
For how to, you can check out the links below and their contexts:
https://help.altair.com/hwdesktop/pythonapi/hypermesh/hm.html#filterbyenumeration-class
https://help.altair.com/hwdesktop/pythonapi/hypermesh/hm.html#collection-class
Hope you enjoy the Hypermesh Python API learning journey!
Shaoyan
2