• 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 Retrieve the value of dX and dY in the current w...

Stats

  • Locked Locked
  • Replies 18
  • Subscribers 143
  • Views 22021
  • 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 Retrieve the value of dX and dY in the current window

ClintMeyer
ClintMeyer over 14 years ago

I would like to create a script that will automatically move whatever I have selected in a layout window by the same amount as the last move.  The last move/copy/stretch relative distance is displayed in the layout window as dX and dY (standing for delta X and delta Y i presume).  Is there a skill function that returns that value?  I looked under the hiGetCurrentWindow() and it was not there.

 Thanks for any help

 Clint

 

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

    Clint,

    As I mentioned in the separate email discussion, having discussed with R&D, there is no function to truly get the "snapped" X and Y (and hence dX and dY) values. The snapping is actually done by the application - and may vary depending on the command currently being performed - so it's actually not that straightforward to emulate in all cases. However, I think the way you've done it is a reasonable compromise. I have filed an enhancement request to get hold of the XY value from the banner - because the "hi" interface knows what the current snapped value is in order to display in the banner and also to update the cursor location - but that will be for a future release.

    In terms of implementing your additional bindkey, I would not try to do it by interfacing with the leHiCopy() function and piggybacking on the form. For a start, the form identifier will vary depending on how many technologies you have open. Secondly it's blocking, so you'd have to start messing with hiRegTimer() to ensure your updates got applied. Thirdly you're tied to private information about the field names on the form, and these may (and indeed have) changed over time. For example, I don't think the callback was called that in the version I tried.

    So a better approach is probably to implement a function like this:

    procedure(abMoveOrCopyByDelta(function delta @optional selectNew)
        let((new (win hiGetCurrentWindow()) cvId (transform (list delta "R0" 1)))
            when(delta && listp(delta) && numberp(xCoord(delta)) && 
                numberp(yCoord(delta)) && !cddr(delta)
                cvId=geGetEditCellView(win)
                new=foreach(mapcar fig geGetSelSet(win)
                    funcall(function fig cvId transform)
                )
                when(selectNew
                    geDeselectAll(win)
                    foreach(fig new
                        geSelectFig(fig)
                    )
                )
                new
            )
        )
    )
    
    hiSetBindKey("Layout" "Meta<Key>=" "abMoveOrCopyByDelta('dbCopyFig abGetDxDy.lastDelta)")

     

    The function copes with both copy and move. You can call:

    abMoveOrCopyByDelta('dbMoveFig abGetDxDy.lastDelta)

    and also if you want the copy to select the newly copied figures, you would do:

    abMoveOrCopyByDelta('dbCopyFig abGetDxDy.lastDelta t)

    Note that in the implementation of abGetDxDy above it is using ~>snapMode - I think it should be ~>segSnapMode as that's what is updated by the copy command (that's the "edit" snap mode rather than the "create" snap mode).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • PeteVT
    PeteVT over 7 years ago in reply to Andrew Beckett

    Hello, I was interested in implementing what was discussed in this thread and would like to know if there were any new developments in how this could be implemented. We use ICADV12.1 and 12.3 depending on the project. Is it possible there is a simpler implementation for the delta value calculation for example?

    Thanks very much,

    Pete

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to PeteVT

    I don’t think anything has changed related to this.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to PeteVT

    I don’t think anything has changed related to this.

    Regards,

    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