Skip to content

Instantly share code, notes, and snippets.

Last active Mar 17, 2016
What would you like to do?
#for debugging purposes use this command in the console
#array set test [parseB5evCsv "$::env(BHAB)/tests/fixtures/B5EV_TD_parameter_template_examplate.csv"]
proc validateB5evData {_parsedData sourceLibrary} {
#start validating if cells exist
# 1. first validate that top level cells exist for shit reg and corner cells
array set parsedData $_parsedData
#parray parsedData
#puts $parsedData(title)
set validationFailed 0
set errorMsg ""
set checkShiftRegRow [checkCellViewsExist $parsedData(shiftRegRow) layout $sourceLibrary]
set $errorMsg [lindex $checkShiftRegRow 1]
set $validationFailed [lindex $checkShiftRegRow 0]
puts $checkShiftRegRow
puts "validationfailed: [lindex $checkShiftRegRow 0]"
if {$validationFailed} {
puts "here"
return -code error $errorMsg
return 0
proc checkCellViewsExist {cell view sourceLibrary} {
set validationFailed 0
set errorMsg {}
if {[catch {dm::getCellViews $view -cellName $cell -libName $sourceLibrary}]} {
set errorMsg "Could not open $cell $view"
set validationFailed 1
return [list $validationFailed $errorMsg]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment