• 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. Trying to fix grid error in the entire library

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 142
  • Views 1016
  • 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

Trying to fix grid error in the entire library

FormerMember
FormerMember over 6 years ago

Hi All,

I am trying to fix grid error of labels in my library using a skill code.

I have tested the below code with a particular cell view, and it is working fine.

libName="test"

res=0.01

cv=geGetWindowCellView()

foreach( txtShp setof(shp cv~>shapes shp~>objType == "textDisplays")
unless( onGrid( car( txtShp~>xy ) res ) && onGrid( cadr( txtShp~>xy ) res )
;printf("Fixing text %s \n" txtShp~>theLabel )
txtShp~>xy = snapClosest( car( txtShp~>xy) res):snapClosest( cadr( txtShp~>xy) res)
)
)

But when I try to modify this code to work on my entire library, it does not gives any error but nothing happens on the cells

libName="test"
res=0.01
procedure( rfipFixOffGridText(cv res )
let( ()
foreach( txtShp setof(shp cv~>shapes shp~>objType == "textDisplays")
unless( onGrid( car( txtShp~>xy ) res ) && onGrid( cadr( txtShp~>xy ) res )
;printf("Fixing text %s \n" txtShp~>theLabel )
txtShp~>xy = snapClosest( car( txtShp~>xy) res):snapClosest( cadr( txtShp~>xy) res)
)
)
)
)
libID=ddGetObj(libName)
all=setof(cells libID~>cells member("layout" cells~>views~>name))
foreach(cell all
cv = dbOpenCellViewByType(libID~>name cell~>name "layout" "" "a")
rfipFixOffGridText(cv res)
dbSave(cv)
dbClose(cv)
)
Please tell me where I am going wrong in my approach.

Thanks

Utkarsh

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    The line:

    foreach( txtShp setof(shp cv~>shapes shp~>objType == "textDisplays")

    should be:

    foreach( txtShp setof(shp cv~>shapes shp~>objType == "textDisplay")

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FormerMember
    FormerMember over 6 years ago in reply to Andrew Beckett

    Thankyou Andrew,
    It worked.

    • 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