• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Question about Making several 'dbCreateRect's into one ...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 916
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question about Making several 'dbCreateRect's into one group

Andy kim
Andy kim over 1 year ago

Hi 

i'm making one fuction about drawing gate_contact easily.(only for a specific part)

( * i'm beginner to skill language but i want to be a of help to my team)

let(
(cv rect1 rect2 rect3 rect4 fg)

cv=geGetEditCellView()

rect1=dbCreateRect(cv list("PO" "drawing") list(list(X X) list(X X))) 

rect2=dbCreateRect(cv list("CO" "drawing") list(list(X X) list(X X)))

rect3=dbCreateRect(cv list("PP" "drawing") list(list(X X) list(X X)))

rect4=dbCreateRect(cv list("M1" "drawing") list(list(X X) list(X X)))

fg=dbCreateFigGroup(cv "myFigGroup1" nil lowerLeft(list(rect1 rect2 rect3 rect4)~>bBox) "R0")

dbAddFigToFigGroup(fg list(rect1 rect2 rect3 rect4))

dbSave(cv)

) ; let exit

the problem is that the shape appears, but isn't grouped together.

please help me ; <



Andy.Kim

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Andy,

    There are two issues here:

    fg=dbCreateFigGroup(cv "myFigGroup1" nil lowerLeft(list(rect1 rect2 rect3 rect4)~>bBox) "R0")

    will result in:

    *Error* dbCreateFigGroup: Invalid point - ((0.0 0.0) (1.0 1.0))

    That's because the list(rect1 rect2 rect3 rect4)~>bBox will return a list of bBoxes for each of the rectangles, but lowerLeft will simply return the first of these boxes (which is not a point). lowerLeft won't return the lower left-most corner of a list of bounding boxes. Anyway, since the origin of the figGroup is not that critical, you could just use:

    fg=dbCreateFigGroup(cv "myFigGroup1" nil lowerLeft(rect1~>bBox) "R0")

    Fixing that will lead to another error:

    *Error* dbAddFigToFigGroup: argument #2 should be a database object (type template = "dd") - (db:0x2761bd1d db:0x2761bd1c db:0x2761bd1b db:0x2761bd1a)

    which is because dbAddFigToFigGroup doesn't accept a list as the second argument. So instead:

    foreach(fig list(rect1 rect2 rect3 rect4)
        dbAddFigToFigGroup(fg fig)
    )

    will do what you want.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Andy kim
    Andy kim over 1 year ago in reply to Andrew Beckett

    Andrew



    Thank you so much. Reply!

    I'm encouraged to proceed with the assignment!

    I'll make sure to finish it : )



    Andy.Kim

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andy kim
    Andy kim over 1 year ago in reply to Andrew Beckett

    Andrew



    Thank you so much. Reply!

    I'm encouraged to proceed with the assignment!

    I'll make sure to finish it : )



    Andy.Kim

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information