Script for component table i made is not taking component names with space. it is throwing an error. similarly i want to make it editable.
@tinh @Pandurang The Script for component table, i made is not taking component names with space. it is throwing an error. similarly i want to make it editable.
::hwtk::dialog .d -title 'Abaqus Component Table'
set table [::hwtk::table [.d recess].table]
pack $table -fill both -expand true
$table columncreate cid -type int -text 'Comp ID'
$table columncreate cname -text 'Comp Name'
$table columncreate cthk -type int -text 'Thickness'
$table columncreate Mname -text 'Material Name'
*createmark comps 1 displayed
set cmp [hm_getmark comps 1]
set lnd [hm_marklength comps 1]
for {set j 1} {$j <= $lnd} {incr j} {
foreach CMP $cmp {
set lm [hm_getcollectorname comps $CMP]
set thk [hm_getthickness comps $CMP]
set Pt [hm_getvalue comps id=$CMP dataname=propertyid]
if {$Pt==0} {
set values 'cid $CMP cthk {Not Assigned} cname $lm Mname {Not Assigned}';
$table rowinsert end row$j -values $values
incr j
} elseif {$Pt!=0} {
set MaT [hm_getvalue props id=$Pt dataname=material.name]
*createmark materials 1 'by name' $MaT
set Mnd [hm_marklength mats 1]
if {$Mnd==0} {
set values 'cid $CMP cthk $thk cname $lm Mname {Not Assigned}';
$table rowinsert end row$j -values $values
incr j
} elseif {$Mnd!=0} {
set values 'cid $CMP cthk $thk cname $lm Mname $MaT';
$table rowinsert end row$j -values $values
incr j
}
}
}
}
.d post