Using Python api to query the maximum node id
Meng yu
Altair Community Member
I want to use hm_detitiymaxid to query the maximum node id in the model, but the following code cannot return an int value. Thanks for any help.
import hm import hm.entities as ent model = hm.Model() N1 = ent.Node(model) N1.localcoordinates =[0,0,0] maxid = model.hm_entitymaxid(ent.Node)
1
Answers
-
Hi Meng,
The hm_ (query) functions return the information via result objects. You will need to query the value from the result object:
Thanks,
Michal Stefuca
Automation & Customization2 -
Michal Stefuca_21473 said:
Hi Meng,
The hm_ (query) functions return the information via result objects. You will need to query the value from the result object:
Thanks,
Michal Stefuca
Automation & CustomizationThank you very mush.
0