Hi Rudy, You need to create a PCell parameter to match the CDF parameter that you created, so call it visibilityM3, and you need to also pass this as an argument to the drawing function. You can actually start with the drawing function and test that outside of the PCell structure for development and testing purposes, and then later update the PCell to match. But for what you've shown above, the bits you need might look like this: pcDefinePCell( list(ddGetObj("test_rudy") "power_grid_pcell" "layout") ( (visbilityM3 "TRUE") ) let( ((cv pcCellView)) powerGridPcell(cv visibilityM3) ); let ) procedure(powerGridPcell(cv m3vis "dt") ;; the template says that the first arg is a db object, second is text string let( (rectRodObj Nx temp) ;; added Nx and temp to locally defined variables, don't need to declare i Nx=7 temp = 1 for(i 0 Nx when(m3vis=="TRUE" ;; test the value of the m3vis argument temp = 0.63 * i rectRodObj = rodCreateRect( ?cvId cv ?layer list("M3" "drawing") ?bBox list(0:temp+0.125 5.04:temp+0.505) ) ); when );End for i ); let ); procedure As an aside, I'd probably use a different term than 'visibility' since that has a different connotation for layout, here you are choosing whether to CREATE the M3 shapes or not, not whether they are visible. I have not tried or tested the above code! Hopefully this helps you. Best regards, Lawrence.
↧