🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to use query commands

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Hello, 

 

I was wondering how the query commands are used in Hypermesh. For example, if I wanted to use the query command hm_getnodessharedbyothercomps, where would I apply this command in Hypermesh and how could I see the resulting node IDs?

 

Thank you in advance, 

Alex

Find more posts tagged with

Sort by:
1 - 6 of 61
    User: "vipin_22401"
    Altair Community Member
    Updated by vipin_22401

    Hi alex,

     

    open command window from menu.  View -> Command window

    And there you can write the commands, for example paste these lines in command window and you will get output.

     

    *createmark comps 1 109
    hm_getnodessharedbyothercomps 1 1 0
    hm_getmark nodes 1

     

    Change component id as per your model.

     

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.afc1cfc5c1b04b8bdcf75b4f7bd090e1.png

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi Vipin, 

     

    Thank you for the reply. I tried using this code in my model with the appropriate component ID but i'm still not getting any outputs. I attached an image of my model with the two solid meshed components connected at the bottom. 

    Also, how do you get multiple lines in one document? I've tried hitting enter but it starts a new document line, or does this not matter? 

     

    Thanks again,

    Alex

    <?xml version="1.0" encoding="UTF-8"?>two comp.PNG

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Nevermind I got it to work. Thank you!

    But one more side question, is there any query command that can grab shared elements from two components? Or is it just nodes?

     

    Thanks for everything!

    User: "vipin_22401"
    Altair Community Member
    Updated by vipin_22401

    Not sure about any direct command for shared elements.

    But you can use  *findmark  to find elements attached to nodes(since you already have nodes from previous command). 

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Does this *findmark command make a new mark containing the elements it gathered? I tried *findmark nodes 1 1 1 surfs 0 1 so it should be making an output mark named surfs 1 right? Every time I try to call on it I get an error. For example, after using *findmark I try to apply a pressure onto the surface using *pressuresonentity surfs 1 1 0 0 10 10 30 1 but no pressure is applied to the surface.

    User: "vipin_22401"
    Altair Community Member
    Updated by vipin_22401

    Hi @alexdonner

    Sorry for late reply, yes you are right about the output mark.

    It should be working if surfs ids present in the mark. Can you share the code?