🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to write a CSV file after getting all connector coordinates and linked comps id.

User: "Jouher_20929"
Altair Community Member
Updated by Jouher_20929

How to write a CSV file after getting all connector coordinates and linked comps id.

I have written following code:

*createmark connectors 1 all
set ce_list [ hm_getmark connectors 1];
foreach CE_L $ce_list {
set coordi [hm_ce_getcords $CE_L]
set LKD [hm_ce_getlinkentities $CE_L comps]
puts $coordi 
puts $LKD

puts 'The coordinates of connector is $coordi and its linked components are $LKD'

}

 

 

Now, I have to write a CSV file, so that I can call all those in different profiles

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "llyle_20499"
    New Altair Community Member
    Updated by llyle_20499

    Hi Jouher,

    Your code should look something like below: 

     

    set str_wrfilename {c:\test.csv};
    set f_id [open $str_wrfilename w+]

    *createmark connectors 1 all
    set ce_list [ hm_getmark connectors 1];
    foreach CE_L $ce_list {
        set coordi [hm_ce_getcords $CE_L]
        set LKD [hm_ce_getlinkentities $CE_L comps]
        puts $f_id '[set coordi],[set LKD]'
    }
     close $f_id