🎉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 read a csv file and create nodes from coordinates

User: "Jouher_20929"
Altair Community Member
Updated by Jouher_20929

I have written a CSV file. Now i have to read the file, create nodes at each coordinates, get created node ids.

 

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

Find more posts tagged with

Sort by:
1 - 1 of 11