I have a TCL script as the attached below.
The code works perfectly fine; I tested with several inputs before however, i have an issue with an input file Defect.csv. I try remove spaces, lines and convert to unix format using unix2dos however, i get this error -can't use empty string as operand of "*"-
I can see format is still messed up. i believe it does not recognize the "Y" due to the spaces. I tried the following to try to remove the spaces/tabs cat OverlapVGSnets.csv | sed 's/ //g' sed 's/ //g' OverlapVGSnets.csv but, this does not solve this. Any suggestion?
See input
X , Y
5568687 , 260755
5568687 , 259891
5568687 , 259999
5568687 , 260755
script:
set x1 [lindex $coords 0]
set y1 [lindex $coords 1]
#The coordinates are to be converted into angstroms
set x2 [expr {int($x1*10)}]
set y2 [expr {int($y1*10)}]
foreach nets [::GetNetsInRegion $x2 $y2 $x2 $y2 vcg temp]
{puts $outfile $nets foreach masterclose
[::cadnavapi::layoutAPI::GetMasterCellName $nets]
{puts $outfile $master}}}} $outfile