• 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. How to undo ruler?

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 143
  • Views 24705
  • 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

How to undo ruler?

kbhow
kbhow over 16 years ago

Hi,

 I have searching many method to undo ruler by using skill but failed.

Its there any method /skill code that manage to draw and undo the ruler one by one.

  • Cancel
Parents
  • dmay
    dmay over 16 years ago

    You can easily setup ruler snapping in 5.1.41. We have done with the code below. The bindkeys I defined allow you to start and stop the ruler with the middle mouse button and it will snap to edges within the aperture defined on the Layout Editor Options form.

    procedure(mySnappingRuler()
      let((gravity infix depth type bouncex bouncey rptVar)
        if(hiGetCurrentCmd(hiGetCurrentWindow()) == "Ruler" then
            mouseAddPt()
        else
            infix   = hiGetCIWindow()->infix
            gravity = envGetVal("layout" "gravityOn")
            depth   = envGetVal("layout" "gravityDepth")
            type    = envGetVal("layout" "gravityType")
            bouncex = envGetVal("layout" "gravityBounceX")
            bouncey = envGetVal("layout" "gravityBounceY")
            envSetVal("layout" "gravityOn"      'boolean t)
            envSetVal("layout" "gravityDepth"   'int     20)
            envSetVal("layout" "gravityType"    'string  "edge")
            envSetVal("layout" "gravityBounceX" 'float   0)
            envSetVal("layout" "gravityBounceY" 'float   0)
            hiGetCIWindow()->infix = t
            rptVar=envGetVal("layout" "modalCommands")
            envSetVal("layout" "modalCommands" 'boolean nil)
            leHiCreateRuler()
            envSetVal("layout" "modalCommands" 'boolean rptVar)
            envSetVal("layout" "gravityOn"      'boolean gravity)
            envSetVal("layout" "gravityDepth"   'int     depth)
            envSetVal("layout" "gravityType"    'string  type)
            envSetVal("layout" "gravityBounceX" 'float   bouncex)
            envSetVal("layout" "gravityBounceY" 'float   bouncey)
            hiGetCIWindow()->infix = infix
        )
      ) ;let
    ) ;proc

    hiSetBindKey("Layout" "<Btn2Down>" "mySnappingRuler()")
    hiSetBindKey("Layout" "<Btn2Down> EF" "mySnappingRuler()")

    You can define the aperture per user using:
    envSetVal("layout" "gravityAperture" 'float 0.5)

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 16 years ago

    You can easily setup ruler snapping in 5.1.41. We have done with the code below. The bindkeys I defined allow you to start and stop the ruler with the middle mouse button and it will snap to edges within the aperture defined on the Layout Editor Options form.

    procedure(mySnappingRuler()
      let((gravity infix depth type bouncex bouncey rptVar)
        if(hiGetCurrentCmd(hiGetCurrentWindow()) == "Ruler" then
            mouseAddPt()
        else
            infix   = hiGetCIWindow()->infix
            gravity = envGetVal("layout" "gravityOn")
            depth   = envGetVal("layout" "gravityDepth")
            type    = envGetVal("layout" "gravityType")
            bouncex = envGetVal("layout" "gravityBounceX")
            bouncey = envGetVal("layout" "gravityBounceY")
            envSetVal("layout" "gravityOn"      'boolean t)
            envSetVal("layout" "gravityDepth"   'int     20)
            envSetVal("layout" "gravityType"    'string  "edge")
            envSetVal("layout" "gravityBounceX" 'float   0)
            envSetVal("layout" "gravityBounceY" 'float   0)
            hiGetCIWindow()->infix = t
            rptVar=envGetVal("layout" "modalCommands")
            envSetVal("layout" "modalCommands" 'boolean nil)
            leHiCreateRuler()
            envSetVal("layout" "modalCommands" 'boolean rptVar)
            envSetVal("layout" "gravityOn"      'boolean gravity)
            envSetVal("layout" "gravityDepth"   'int     depth)
            envSetVal("layout" "gravityType"    'string  type)
            envSetVal("layout" "gravityBounceX" 'float   bouncex)
            envSetVal("layout" "gravityBounceY" 'float   bouncey)
            hiGetCIWindow()->infix = infix
        )
      ) ;let
    ) ;proc

    hiSetBindKey("Layout" "<Btn2Down>" "mySnappingRuler()")
    hiSetBindKey("Layout" "<Btn2Down> EF" "mySnappingRuler()")

    You can define the aperture per user using:
    envSetVal("layout" "gravityAperture" 'float 0.5)

    Derek

    • 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