• 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. Skill code to copy object to another metal layer but maintain...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 4236
  • 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

Skill code to copy object to another metal layer but maintain the objects purpose

cvictoria
cvictoria over 1 year ago

Hi so I'm trying to convert my selected object into another metal layer put want to maintain the purpose. For example, if i have M1 exclude I want to convert it to M2 exclude. or an M1 drawing to a M2 drawing etc.

The code I've written works if I always want to be converting to drawing, but I can't seem to figure out how I can maintain the purpose. I don't want to only be converting it to type "drawing" and placing my objPurpose variable instead of "drawing" gives me errors.

procedure(CopytoLayer(objT)

obj = geGetSelSet()


objPurpose= cadr(car(obj~>lpp)) 


printf("The objects purpose is %s \n" objPurpose)

case(objT

(objT == "M1"

obj~>lpp = ("M1" "drawing"))

(objT == "M2"

obj~>lpp = '("M2" "drawing"))

(objT == "M3"

obj~>lpp = '("M3" "drawing"))

))

I understand I could make more cases where I can assign according to the result of my objPurpose variable, but this seems tedious to do for M1 exclude, M1 drawing, M1 vdd etc. So I'm sure theres a better way but I'm not seeing it.

Any help would be appreciated.

  • Cancel
  • AurelBuche
    AurelBuche over 1 year ago

    Hi, There you go:

    procedure(CopytoLayer(layerName)
      obj = car(geGetSelSet())
      destructuringBind( (_layer purpose) obj->lpp
        printf("The objects purpose is %s \n" purpose)
          if( leIsLayerValid( list( layerName purpose ))
            then
            obj->lpp = list( layerName purpose )
            else
            obj->lpp = list( layerName "drawing" )
    )))

    Cheers,

    Aurélien

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 1 year ago

    Hi,

    Here's something you can try - using the 'Active Layer' (i.e. the one selected in the Layers Palette) as the metal to change TO, select one or more shapes and run the code below:

    procedure(CCFchangeToActiveLayKeepPurpose(@optional (objs geGetSelectedSet()) "l")
      let((activeLpp)
        activeLpp = leGetEntryLayer()
        objs~>layerName = car(activeLpp)
      )
    )

    You can put 'CCFchangeToActiveLayKeepPurpose()' on a bindkey so you'd just need to select the metal (or other layer to change to), select your shape or shapes, and then press the bindkey - it keeps the current purpose but changes the layer to the one that is active in the Layers Palette. This function does not attempt to check if the new lpp combination would be valid, so if the current shapes' purpose does not exist for the new layer it would fail (or worse, it would do the action but then you might not be able to select the shape again as it is not on a valid LPP, so be warned).

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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