• 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 24691
  • 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
  • ccKev
    ccKev over 16 years ago

    hi guys,

     im able to draw the ruler and clear the last ruler base on the script from dmay. user can draw the ruler and clear the ruler by a bindkey, without calling the function again. the problem is, because of the enter function, it would not be able to show the length of ruler during drawing. it only shows the length when user has finished entering points.

    any idea on how to show the length while drawing by enter function?

    thanks!

    kevin

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

    I don't know of a way to do this. The only dynamic ruler I know of is leHiCreateRuler. This is an enterFunction provided by Cadence that doesn't allow you to undo previous rulers. Thus I provided the above enterFunction to overcome the undo limitation but this loses the dynamic ruler capability. I don't know of any way to get two enterFunctions to run at the same time. So you can either run one or the other, but not both.

    This request falls into the Cadence R&D court as an enhancement.

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 16 years ago

     Hi Derek, Kevin and How,

    In the soon-to-be-arriving IC614 release there are many enhancements to the ruler capabilities, such as the ability to draw and then remove specific rulers.  Since this is an in-built capability, it will behave similarly to the existing ruler in the way that you can see the ruler and tick marks and sizes while it is being drawn (which you don't see if you are using the enterLine enter function).  The ruler function will also have built in "smarts" so that itcan guess if you are measuring from edge to edge, corner to corner etc. based on ruler direction and initial points.  It will use, I believe, the gravity aperture as the search window for the point and can be made to "snap" to point types (e.g. center, edge, vertex).

    Hopefully the new capabilities will address many, if not all, of the concerns that layout designers have about rulers.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 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
  • ahamlett
    ahamlett over 16 years ago
    Derek,

    I would like to thank you for sharing the mySnappingRuler code! I didn't know that gravity could work with a depth!
    • 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