I want to write a CSV file which includes information like Connector location and component to which weld is done. Please help me in telling how to get this information from connectors and write a CSV file.

Jouher_20929
Jouher_20929 Altair Community Member
edited October 2020 in Community Q&A

I want to write a CSV file which includes information like Connector location and component to which weld is done. Please help me in telling how to get this information from connectors and write a CSV file.

My aim is to get all the information related to mat100 hexa in LsDyna in CSV file, change it to ACM Shell gap, and read  in Nastran profile

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2018

    Hi Jouher,

     

    You can get the location (coordinates) of the connector by hm_ce_detailget command as below:

     hm_ce_detailget id tripearray ce_cords

     

    Linked component IDs are obtained as:

     hm_ce_getlinkedentities id comps

    Regards,

     

  • Jouher_20929
    Jouher_20929 Altair Community Member
    edited March 2018

    I have written this code. Please help me to read this code and create nodes at each coordinaes.

     

     

    set dir [tk_chooseDirectory \
            -initialdir ~ -title 'Choose a directory']
    cd $dir
    set fp [open '$dir/Connectors_comp.csv' w+]

    *createmark connectors 1 all
    set ce_list [ hm_getmark connectors 1];


    puts $fp 'connector id,connector coordinates,linked comps id'

    foreach CE_L $ce_list {

    puts $fp '$CE_L,[hm_ce_getcords $CE_L],[hm_ce_getlinkentities $CE_L comps]'


    }
    close $fp