I am working on creation of Pcell which has around 15 parameters in form of check box(value type = boolean) and each check box enables a object in the Pcell. I want to create condition based checkbox where 8 checkbox are primary and independent and rest 7 are dependent on previous 8 and enables or disables depending on the 8 primary one.
For example in the code below(with only 4 parameters(checkbox)) which is generated by graphical pcell option (as I am beginner in Pcell skill and want to start with a working code), If m1 is selected then contLD checkbox is disabled and if m1LD is selected by user then cont is disabled. How can this be done.
Also is there a possibility I can make one checkbox behave differently based on primary checkboxes( for example m1 and m1LD are primary and instead of having two parameters cont and contLD I can have just cont which behaves as cont or contLD depending on whether m1 or m1LD are selected respectively )
pcDefinePCell(list(ddGetObj("Pcells") "MESH_SKILL" "layout")
((cont boolean "TRUE")
(contLD boolean "TRUE")
(m1 boolean "TRUE")
(m1LD boolean "TRUE")
)
let((m1 cont contLD m1LD pcMember
pcStretchGroup stretchOffsetX stretchOffsetY pcLib pcMaster
pcInst pcTerm pcPin pcPinName pcNet
pcTermNet pcNetName pcTermNetName pcMosaicInst pcParameters
pcParamProp pcStep pcStepX pcStepY pcRepeat
pcRepeatX pcRepeatY pcIndexX pcIndexY pcLayer
pcPurpose pcLabelText pcLabelHeight pcPropText pcParamText
pcCoords pcPathWidth pcPolygonMargin
)
(pcLib = (pcCellView~>lib))
(pcParameters = ((pcCellView~>parameters)~>value))
(pcParamProp = car(exists(prop pcParameters
((prop~>name) == "m1")
)
))
(m1 = (pcParamProp~>value))
if(((pcParamProp~>valueType) == "boolean")
(m1 = (m1 == "TRUE"))
)
(pcParamProp = car(exists(prop pcParameters
((prop~>name) == "cont")
)
))
(cont = (pcParamProp~>value))
if(((pcParamProp~>valueType) == "boolean")
(cont = (cont == "TRUE"))
)
(pcParamProp = car(exists(prop pcParameters
((prop~>name) == "contLD")
)
))
(contLD = (pcParamProp~>value))
if(((pcParamProp~>valueType) == "boolean")
(contLD = (contLD == "TRUE"))
)
(pcParamProp = car(exists(prop pcParameters
((prop~>name) == "m1LD")
)
))
(m1LD = (pcParamProp~>value))
if(((pcParamProp~>valueType) == "boolean")
(m1LD = (m1LD == "TRUE"))
)
dbReplaceProp(pcCellView "viewSubType" "string" "maskLayoutParamCell")
dbReplaceProp(pcCellView "_pcCompiledCounter" "int" 1081)
if(m1LD then
(pcLayer = 8)
(pcPurpose = "drawing")
(pcInst = dbCreatePolygon(pcCellView
list(pcLayer pcPurpose)
list((-2.5:2.5)
(2.5:2.5)
(2.5:-2.5)
(-2.5:-2.5)
(-2.5:-1.5)
(1.5:-1.5)
(1.5:1.5)
(-1.5:1.5)
(-1.5:-1.5)
(-2.5:-1.5)
)
))
)
if(m1 then
(pcLayer = 8)
(pcPurpose = "drawing")
(pcInst = dbCreatePolygon(pcCellView
list(pcLayer pcPurpose)
list((2.5:2.5)
(1.0:2.5)
(1.0:-1.0)
(-1.0:-1.0)
(-1.0:1.0)
(1.0:1.0)
(1.0:2.5)
(-2.5:2.5)
(-2.5:-2.5)
(2.5:-2.5)
)
))
)
(pcLayer = 2)
(pcPurpose = "drawing")
(pcInst = dbCreateRect(pcCellView
list(pcLayer pcPurpose)
list((-2.5:-2.5)
(2.5:2.5)
)
))
if(cont then
(pcLayer = 7)
(pcPurpose = "drawing")
(pcInst = dbCreateRect(pcCellView
list(pcLayer pcPurpose)
list((1.0:1.5)
(1.5:2.0)
)
))
)
if(contLD then
(pcLayer = 7)
(pcPurpose = "drawing")
(pcInst = dbCreateRect(pcCellView
list(pcLayer pcPurpose)
list((1.0:-2.0)
(1.5:-1.5)
)
))
) t
)
)