diff --git a/kratos.gid/scripts/Writing/WriteSubModelPart.tcl b/kratos.gid/scripts/Writing/WriteSubModelPart.tcl index 90174cd51..5abb19851 100644 --- a/kratos.gid/scripts/Writing/WriteSubModelPart.tcl +++ b/kratos.gid/scripts/Writing/WriteSubModelPart.tcl @@ -253,11 +253,12 @@ proc write::getSubModelPartId {cid group} { set name [write::GetWriteGroupName $group] set good_name [write::transformGroupName $name] return $good_name - } - set find [list $cid ${group}] - if {[dict exists $submodelparts $find]} { - return [dict get $submodelparts [list $cid ${group}]] - } { - return 0 + } else { + set find [list $cid ${group}] + if {[dict exists $submodelparts $find]} { + return [dict get $submodelparts [list $cid ${group}]] + } { + return 0 + } } } \ No newline at end of file