Using Python api to query the maximum node id

User: "ThomasCook"
Altair Community Member
Updated by ThomasCook

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)

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "Michal Stefuca"
    Altair Employee
    Updated by Michal Stefuca

    Hi Meng,

    The hm_ (query) functions return the information via result objects. You will need to query the value from the result object:


    image

     

    Thanks,

    Michal Stefuca
    Automation & Customization

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

    Hi Meng,

    The hm_ (query) functions return the information via result objects. You will need to query the value from the result object:


    image

     

    Thanks,

    Michal Stefuca
    Automation & Customization

    Thank you very mush.