Yes, I have read the documentation about HWAT and scripting in hypermesh in general.
I think it is not really clear, which coding style should be used. Also I do not think, I can get my script working, by using HWAT functions only. Therefore I use the style, described in the second link of my last post. I use a lot of those tcl modify commands (*createxyz...) and tcl query commands (hm_getmethatwhatiwant) with the occasional HWAT command (::hwat::topic::function).
At the moment I do not work with real parts. I use two rectangular quad meshes of 1mm element size, which are 1,6 mm apart and I try to connect them by my weld configuration automatically.
To be honest, I did not use the closest node or closest element functions because I felt, it was not specific enough.
I rather used PLOTEL elements as header in the seam weld realization, to be able to extract those nodes from the hexa elements, since they are connected to one sheet by PLOTEL elements. I managed to to that, but it's quite a hassle.
Figure: 1D PLOTEL elements connecting nodes of HEXA elements with nodes of QUAD shell meshes
Therefor the next question:
Is it possible to query elements by their type? For example in one component there are HEXA elements and PLOTEL elements, can I query then directly? What would be an efficient way, to get a list of all PLOTEL elements of one component or to get a list of all HEXA elements of one component?
Okay, nevermind. I found what I needed. Data names in reference guide is a useful resource to create efficient queries.
I leave this here, for others as reference.