How to use query commands
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
Answers
-
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 1Change component id as per your model.
0 -
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
0 -
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!
0 -
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).
0 -
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.
0 -
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?
0