Hi!!
I am trying to create a dynamic array. please test out the folowing code. it works fine, but the handle that varies the columns is not very sensitive. how can i solve this problem?
pcDefinePCell(
list(ddGetObj("adhillib") "rect1" "layout")
(
(Width 0.1)
(Length 0.2)
)
let(((cv pcCellView))
rectRodObj = rodCreateRect(
?name "myRect"
?cvId cv
?layer list("M1" "drawing")
?width Width
?length Length
?origin list(0 0)
)
)
)
pcDefinePCell(
list(ddGetObj("adhillib") "rectarray1" "layout")
(
(columns 1)
(space 0.2)
)
let(((cv pcCellView) (width1 0.1) width2 (length1 0.2) cellview rectRodObj rectRodObj1)
mosaicbBox = dbCreateParamSimpleMosaicByMasterName(cv "adhillib" "rect1" "layout"
"rect_array" 0:0 "R0" 1 columns 0.2 space list(list("Width" "float" width1) list("Length" "float" length1)) )
cellview = dbOpenCellViewByType("adhillib" "rect1" "layout")
bBox = dbComputeBBoxNoNLP(cellview)
width2 = xCoord(upperRight(bBox)) - xCoord(lowerLeft(bBox))
columnbBoxWidth = xCoord(upperRight(mosaicbBox ~> bBox)) - xCoord(lowerLeft(mosaicbBox ~> bBox))
columnbBoxLength = yCoord(upperRight(mosaicbBox ~> bBox)) - yCoord(lowerLeft(mosaicbBox ~> bBox))
rectRodObj = rodCreateRect(
?name "myRect10"
?cvId cv
?layer list("ALPHA" "drawing")
?width space - width1
?length length1
?origin list(width2 0)
)
rectRodObj1 = rodCreateRect(
?name "myRect11"
?cvId cv
?layer list("ALPHA" "drawing")
?width columnbBoxWidth
?length columnbBoxLength
?origin list(0 0)
)
rodAssignHandleToParameter(
?parameter "space"
?rodObj rectRodObj
?handleName "centerRight"
?stretchDir "X"
?displayName "space"
?displayExpression "space"
?updateIncrement 0.1
); rodAssignHandleToParameter
rodAssignHandleToParameter(
?parameter "columns"
?rodObj rectRodObj1
?handleName "centerRight"
?stretchDir "X"
?displayName "columns"
?displayExpression "columns"
?updateIncrement space
); rodAssignHandleToParameter
)
)
Adhil