search a componet using loop
Find more posts tagged with
Sort by:
1 - 8 of
81
yes
I am using nastran profile.
Tinh is already gave you the good example:-)
-Here is my example-
# Auto property creation #
*evaltclscript 'AutoPropertyCreate.tcl' 0;
*evaltclstring '::autoproperty::Main' 0;
# Thickness update from CSV #
set ft {{'CSV Files' .csv} {'All Files' *}};
set fn [tk_getOpenFile -filetypes $ft];
set fh [open $fn r];
while {![eof $fh]} {
gets $fh line;
lassign [split $line ,] cid T;
if {[hm_entityinfo exist comps $cid -byid] == '1'} {
set pid [hm_getvalue comps id=$cid dataname=propertyid];
*setvalue props id=$pid PSHELL_T=$T;
}
}
close $fh;
If you are not using PSHELL card, you have to change the attribute name.
If I understand correctly you want to search within CSV file from Hyperworks?