• 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. need help with dbCopyFig issue

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 14434
  • 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

need help with dbCopyFig issue

Terry1959
Terry1959 over 6 years ago

I have a skill procedure for copying/moving selected shapes/cells/etc. on variable pitches. Works great except in groups and in arrays.

When used in a group, it copies the selection fine... but the original item is thrown out of the group, leaving the copied version inside the group.

I need both copied and original to remain in the group.

When in an mosaic array, the program doesn't work at all.

here is the code...

if(mode == "copy" then
count = CopyVar
while((count>0)
foreach(object geGetSelSet()
dbCopyFig(object geGetEditRep())
dbMoveFig(object nil list(coord "R0"))
)

any help on a way to solve these issues would be appreciated.

Thanks much

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    I've no idea what you expect your code to do - it's incomplete (you have a while loop and an if that aren't closed, and presumably there must be something done afterwards).

    I did the following:

    1. Created a group with some shapes in it
    2. Edit in place that group
    3. mode="copy" CopyVar=1 coord=20:30
    4. select some of the shapes in the group
    5. Execute this code:

    if(mode == "copy" then
      count = CopyVar
      while((count>0)
        foreach(object geGetSelSet()
          dbCopyFig(object geGetEditRep())
          dbMoveFig(object nil list(coord "R0"))
        )
        count=0 ; to ensure while loop ends
      )
    )

    What this does is what I'd expect. The selected shapes get moved by the offset that is in coord (i.e. shifted by 20:30) but stay in the group. New copies appear in the cellView (not in the group) at the original locations of those shapes. Not surprising because the dbMoveFig is the thing moving the original shapes and the dbCopyFig is not trying to put the new copies into the figGroup.

    So the code doesn't appear to be making the original item "thrown out" of the group - nor is it adding the copy into the group - so it's not doing what you say.

    If you want the new copies in the figGroup you're editing in place, then do:

    if(mode == "copy" then
      count = CopyVar
      curFigGroup=leGetEditFigGroup()
      while((count>0)
        foreach(object geGetSelSet()
          newCopy=dbCopyFig(object geGetEditRep())
          when(curFigGroup
            dbAddFigToFigGroup(curFigGroup newCopy)
          ) 
          dbMoveFig(object nil list(coord "R0"))
        )
        count=0 ; to ensure while loop ends
      )
    )

    Not sure that's what you really wanted, but maybe it will clarify your thoughts?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    I've no idea what you expect your code to do - it's incomplete (you have a while loop and an if that aren't closed, and presumably there must be something done afterwards).

    I did the following:

    1. Created a group with some shapes in it
    2. Edit in place that group
    3. mode="copy" CopyVar=1 coord=20:30
    4. select some of the shapes in the group
    5. Execute this code:

    if(mode == "copy" then
      count = CopyVar
      while((count>0)
        foreach(object geGetSelSet()
          dbCopyFig(object geGetEditRep())
          dbMoveFig(object nil list(coord "R0"))
        )
        count=0 ; to ensure while loop ends
      )
    )

    What this does is what I'd expect. The selected shapes get moved by the offset that is in coord (i.e. shifted by 20:30) but stay in the group. New copies appear in the cellView (not in the group) at the original locations of those shapes. Not surprising because the dbMoveFig is the thing moving the original shapes and the dbCopyFig is not trying to put the new copies into the figGroup.

    So the code doesn't appear to be making the original item "thrown out" of the group - nor is it adding the copy into the group - so it's not doing what you say.

    If you want the new copies in the figGroup you're editing in place, then do:

    if(mode == "copy" then
      count = CopyVar
      curFigGroup=leGetEditFigGroup()
      while((count>0)
        foreach(object geGetSelSet()
          newCopy=dbCopyFig(object geGetEditRep())
          when(curFigGroup
            dbAddFigToFigGroup(curFigGroup newCopy)
          ) 
          dbMoveFig(object nil list(coord "R0"))
        )
        count=0 ; to ensure while loop ends
      )
    )

    Not sure that's what you really wanted, but maybe it will clarify your thoughts?

    Andrew.

    • 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