;; for t
Tech_Metal_Layer_List = list("M1 drawing" "M2 drawing" "M3 drawing" "AP drawing")
Tech_Pin_Layer_List = list("M1 pin" "M2 pin" "M3 pin" "AP pin")
;; for s
;;Tech_Metal_Layer_List = list("M1 drawing" "M2 drawing" "M3 drawing")
;;Tech_Pin_Layer_List = list("MnTXT metal1" "MnTXT metal2" "MnTXT metal2" "ALPA txt")
procedure(layerChange(layerIndex)
let((objSet)
objSet = geGetSelectedSet()
metalLayer = nth(layerIndex Tech_Metal_Layer_List)
metalLayer_parse = parseString(metalLayer)
metalLayer_name = car(metalLayer_parse)
metalLayer_purpose = cadr(metalLayer_parse)
pinLayer = nth(layerIndex Tech_Pin_Layer_List)
pinLayer_parse = parseString(pinLayer)
pinLayer_name = car(pinLayer_parse)
pinLayer_purpose = cadr(pinLayer_parse)
foreach(x objSet
if(x->purpose == "drawing" then ;; metal layerChange
x->layerName = metalLayer_name
);end if
if(x->purpose != "drawing" then ;; pin layerChange
x->layerName = pinLayer_name
x->purpose = pinLayer_purpose
);end if
);end foreach
);end let
);end procedure
hiSetBindKey("
layout" "shift<key>1" "layerChange(1)")
hiSetBindKey("Layout" "shift<key>2" "layerChange(2)")
hiSetBindKey("Layout" "shift<key>3" "layerChange(3)")
hiSetBindKey("Layout" "shift<key>4" "layerChange(4)")