# find attached node

## Recommended Posts

Hello everyone,

I will give a element id.

I want to find the nodes attached to this element

and also nodes attached to nodes found in previous step

In hyperview and probe results to all these nodes.

which command I can use for find attached in hyperview

Thank you

##### Share on other sites

There is no direct command, you will have to come up with an algorithm using poIModel GetSelectionSetHandle

##### Share on other sites

If direct command not available, need to built one.

I am not able to come up with logic to get find attached,

nothing seem conman

any body have any suggestion on logic?

##### Share on other sites

Try finding adjacent elems and then find attached nodes of them

##### Share on other sites

I can take element id (primary element)

find adjacent as tinh suggested, and find nodes attached to them.

however I need nodes from adjacent element only attached to primary element given in first step, how would I filter other nodes?

##### Share on other sites

first take 4 nodes of primary element => store in NodeList1

then find attached nodes of them => store in NodeList2

now take nodes in NodeList2 but not in NodeList1

##### Share on other sites
30 minutes ago, tinh said:

first take 4 nodes of primary element => store in NodeList1

then find attached nodes of them => store in NodeList2

now take nodes in NodeList2 but not in NodeList1

you did not get my question correctly, I might have mislead you somewhere.

I do not want entire NodeList2, I need only nodes which are attched to NodeList1.

In fact to go in more details, I need to process entire NodeList1.

Suppose my element id is x

corresponding to this id x I will find attached nodes (suppose for hex element, nodes =8) node ids [1 2 3 4 5 6 7 8 ]

Now for each node from above set I need to find attached node from adjacent element and find distance from it

For node id 1 (first node from list), need to find attached nodes and find distance between node id 1 and all attached nodes

##### Share on other sites

OK. I see

first find all elems attached with element x,  for example you find (e1, e2, e3, e4, e5, e6)

now do a loop for each NodeId in ids [1 2 3 4 5 6 7 8 ] of x :

- find which elems (e1, e2, e3, e4, e5, e6) have this NodeId, by with each element => get its nodes => and search for NodeId, if found => measure distance

##### Share on other sites

Hello everyone,

I am still working on above mentioned script.

I am stuck at following point

Now I can get node numbers, I have two node numbers, how do I measure distance between two nodes. (I am working with poIPost AddMeasure  not able to figure out how it works)

does anybody have any reference example for same?

have created following codes please review

I want distance between nodes 519626 and 519457

Quote

......

......

client_handle GetModelHandle m [client_handle GetActiveModel]

distance Distance Between

distance AddNode "1 519626 519457 %1"

##### Share on other sites

found solution on measure

thank you

Quote

::post::GetPostHandle post1

##To create a distance between measures and plot it:

post1 GetMeasureHandle Dist \$measure_Dist

Dist SetType "distance between"

set model_id 1

::post::Draw

Dist GetValueList mag

post1 RemoveMeasure \$measure_Dist

Dist ReleaseHandle

Livil Lyle and tinh like this

##### Share on other sites

Hello Everyone,

found a simple way to find attached nodes

with this can easily find the find attached nodes

Quote

::post::GetActiveModelHandle m

##unset TempMasterElementNodes

#add all nodes attached to the current selection

tinh likes this

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.