To get node id attached to a system through CELAS2 Element

Vikas Kumar_22189
Vikas Kumar_22189 Altair Community Member
edited October 2020 in Community Q&A

Hi all,

 

I wants to get system which is attached to 'CELAS2' element.

                                            or

Node we can get which is attached to 'CELAS2' element. From here How we can identify that system is also attached to that node.

Is there any way to know node id from which a system is attached or can we identify whether a system is attached to a 'CELAS2' element.

 

I am using this code to get node id of 'origin' but it is showing zero.

 

# With system id 

set x [hm_getvalue systems id=52 dataname=originnodeid] ;  # returning 0

 

# With system collector showing 0 attribute 
set x [hm_getvalue systemcols id=1 dataname=attributesmax] ; 

 

we can get node id by using Xref entities in HM for reference i am keeping image:-

<?xml version="1.0" encoding="UTF-8"?>nodeId.thumb.png.09d64f3116e7aa33765419dd2fcec250.png

 

@tinh or @Livil Lyle help asap.

 

Best Regards,

Vikas Kumar

 

 

Answers

  • llyle_20499
    llyle_20499 New Altair Community Member
    edited March 2019

    Hi Vikas,

     

    Have you tried: 

     

    set systemid [hm_getvalue nodes id=$nodeID1 dataname=outputsystemid];

     

    else please share a simple model with that element and system. 

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited March 2019

    Thanks livil,

    This is helpful. I never tried in reverse as you have mentioned.

    And how we can review system as shown in image. If we know system id.

    <?xml version="1.0" encoding="UTF-8"?>reviewSyst.thumb.JPG.b497882565fe00127479dd4a871d85e8.JPG

     

    @Livil Lyle please suggest.

     

    I tried below code but it is not helpful.

     


    *createmark systems 1 'all'
    set sysID [hm_getmark systems 1]
    *clearmarkall 1
    foreach sys $sysID {
        *createmark systems 1 'by id' $sysID
        *showentitybymark 1 1 2
        *reviewentity systems 'by id' $sys 3 1 0
        hm_redraw
        tk_messageBox -message 'see is it ok' 
        *resetreview
    }

     

    Best Regards,

    Vikas Kumar

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited March 2019

    Hi Vikas,

     

    Have you tried: 

     

    set systemid [hm_getvalue nodes id=$nodeID1 dataname=outputsystemid];

     

    else please share a simple model with that element and system. 

     

     

    Hi Livil,

     

    Can we get system 'reference and displacement' node by using tcl\tk script.

    It's very urgent. 

     

    @Livil Lyle @tinh

     

    Best Regards,

    Vikas Kumar

  • llyle_20499
    llyle_20499 New Altair Community Member
    edited March 2019

    Hi Vikas,

     

    I'm not sure of what you mean by reference and displacement, Please refer to Datanames of system and nodes which can be queried using hm_getentityvalue. 

    Unable to find an attachment - read this blog

  • vipin_22401
    vipin_22401 Altair Community Member
    edited October 2020
  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited October 2020

     

    Hi VIpin,

     

    But in this method how to check which is assigned node and which one is referenced node.

    It is returning both.

     

    Regards,

    Vikas Kumar

  • tinh
    tinh Altair Community Member
    edited March 2019

     

     

    set x [hm_getvalue systems id=52dataname=originnodeid] ;  # returning 0 because system is not defined by node it's just a system located at that position .

     

     

  • tinh
    tinh Altair Community Member
    edited March 2019

     

    Hi VIpin,

     

    But in this method how to check which is assigned node and which one is referenced node.

    It is returning both.

     

    Regards,

    Vikas Kumar

     

     

    As Vipin suggests

    *createmark nodes 1 'equal to value' inputsystemid $sysID

    => reference system

    *createmark nodes 1 'equal to value' outputsystemid $sysID

    => displacement system

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited March 2019

    Thanks livil,

    This is helpful. I never tried in reverse as you have mentioned.

    And how we can review system as shown in image. If we know system id.

    <?xml version="1.0" encoding="UTF-8"?>reviewSyst.thumb.JPG.b497882565fe00127479dd4a871d85e8.JPG

     

    @Livil Lyle please suggest.

     

    I tried below code but it is not helpful.

     


    *createmark systems 1 'all'
    set sysID [hm_getmark systems 1]
    *clearmarkall 1
    foreach sys $sysID {
        *createmark systems 1 'by id' $sysID
        *showentitybymark 1 1 2
        *reviewentity systems 'by id' $sys 3 1 0
        hm_redraw
        tk_messageBox -message 'see is it ok' 
        *resetreview
    }

     

    Best Regards,

    Vikas Kumar

     

     

    And tinh,

     

    How we can review like this. as shown in image.

     

  • tinh
    tinh Altair Community Member
    edited March 2019

    Using *reviewentity is a good ideal

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited March 2019

    Nope it's not working as shown in image.