• 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. Store recall layout editor view positions

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 14259
  • 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

Store recall layout editor view positions

blankman
blankman over 14 years ago

Hi all,

I am hoping to store and recall viewing positions in layout editor. I am taking the window bounding box from the layout view with geGetWindowBox(), which gives 2 coordinates. This stores the xy position and zoom level of the layout editor automatically. I am hoping to use these coordinates again to set the layout view position but can't locate a suitable command to do so. Is it possible? Something along the lines of geSetWindowBox() would sort it but doesn't seem to exist.

Thanks,
Brian.

  • Cancel
Parents
  • blankman
    blankman over 14 years ago

    Andrew, another quick question, below is the code I am using. However, when I execute the second procedure without having executed the first the variable wid1 is undefined and I get an error message "unbound variable wid1". Is there anyway around this, say to check if a variable is yet defined and if not to exit the function or execute another function?

    Thanks,

    Brian.

     

     procedure(BSstoreView1()
        wid1=geGetWindowBox(hiGetCurrentWindow())
        sprintf(message "View 1 stored\n")
        when(message
                            win=geGetEditCellViewWindow(geGetEditCellView())
                            point=hiGetPoint(win)
                            geDeleteAllHilightSet(geGetWindowCellView())
                            ;Set label size depending on window zoom
                                    x2 = xCoord(cadr(geGetWindowBox(hiGetCurrentWindow())))
                                    x1 = xCoord(car(geGetWindowBox(hiGetCurrentWindow())))
                                    dx = x2 - x1
                                    labelheight = dx/100
                            when(point
                                    hs=geCreateHilightSet(geGetWindowCellView()
                                            abDynamicDisplay.lpp || '("y4" "drawing"))
                                    geAddHilightLabel(
                                            hs
                                            point
                                            message
                                            abDynamicDisplay.justify || "centerCenter"
                                            abDynamicDisplay.orient || "R0"
                                            abDynamicDisplay.font || "roman"
                                            abDynamicDisplay.height || labelheight
                                            nil
                                    )
                                    hs->enable=t
                                    geRefresh()
                                    hiRegTimer("geDeleteAllHilightSet(geGetWindowCellView()) geRefresh()" 25)
                            )
                    )
            message = nil
    );procedure
    hiSetBindKey("Layout" "Ctrl Shift<key>KP_Home" "BSstoreView1()")


    procedure(BSreselectView1()
        win=geGetEditCellViewWindow(geGetEditCellView())
        hiZoomIn(win wid1)
        sprintf(message "View 1 selected\n")
        when(message

                            win=geGetEditCellViewWindow(geGetEditCellView())
                            point=hiGetPoint(win)
                            geDeleteAllHilightSet(geGetWindowCellView())
                            ;Set label size depending on window zoom
                                    x2 = xCoord(cadr(geGetWindowBox(hiGetCurrentWindow())))
                                    x1 = xCoord(car(geGetWindowBox(hiGetCurrentWindow())))
                                    dx = x2 - x1
                                    labelheight = dx/100
                            when(point
                                    hs=geCreateHilightSet(geGetWindowCellView()
                                            abDynamicDisplay.lpp || '("y4" "drawing"))
                                    geAddHilightLabel(
                                            hs
                                            point
                                            message

                                            abDynamicDisplay.justify || "centerCenter"
                                            abDynamicDisplay.orient || "R0"
                                            abDynamicDisplay.font || "roman"
                                            abDynamicDisplay.height || labelheight
                                            nil
                                    )
                                    hs->enable=t
                                    geRefresh()
                                    hiRegTimer("geDeleteAllHilightSet(geGetWindowCellView()) geRefresh()" 25)
                            )
                    )
        message = nil
    );procedure
    hiSetBindKey("Layout" "Ctrl<key>KP_Home" "BSreselectView1()")

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • blankman
    blankman over 14 years ago

    Andrew, another quick question, below is the code I am using. However, when I execute the second procedure without having executed the first the variable wid1 is undefined and I get an error message "unbound variable wid1". Is there anyway around this, say to check if a variable is yet defined and if not to exit the function or execute another function?

    Thanks,

    Brian.

     

     procedure(BSstoreView1()
        wid1=geGetWindowBox(hiGetCurrentWindow())
        sprintf(message "View 1 stored\n")
        when(message
                            win=geGetEditCellViewWindow(geGetEditCellView())
                            point=hiGetPoint(win)
                            geDeleteAllHilightSet(geGetWindowCellView())
                            ;Set label size depending on window zoom
                                    x2 = xCoord(cadr(geGetWindowBox(hiGetCurrentWindow())))
                                    x1 = xCoord(car(geGetWindowBox(hiGetCurrentWindow())))
                                    dx = x2 - x1
                                    labelheight = dx/100
                            when(point
                                    hs=geCreateHilightSet(geGetWindowCellView()
                                            abDynamicDisplay.lpp || '("y4" "drawing"))
                                    geAddHilightLabel(
                                            hs
                                            point
                                            message
                                            abDynamicDisplay.justify || "centerCenter"
                                            abDynamicDisplay.orient || "R0"
                                            abDynamicDisplay.font || "roman"
                                            abDynamicDisplay.height || labelheight
                                            nil
                                    )
                                    hs->enable=t
                                    geRefresh()
                                    hiRegTimer("geDeleteAllHilightSet(geGetWindowCellView()) geRefresh()" 25)
                            )
                    )
            message = nil
    );procedure
    hiSetBindKey("Layout" "Ctrl Shift<key>KP_Home" "BSstoreView1()")


    procedure(BSreselectView1()
        win=geGetEditCellViewWindow(geGetEditCellView())
        hiZoomIn(win wid1)
        sprintf(message "View 1 selected\n")
        when(message

                            win=geGetEditCellViewWindow(geGetEditCellView())
                            point=hiGetPoint(win)
                            geDeleteAllHilightSet(geGetWindowCellView())
                            ;Set label size depending on window zoom
                                    x2 = xCoord(cadr(geGetWindowBox(hiGetCurrentWindow())))
                                    x1 = xCoord(car(geGetWindowBox(hiGetCurrentWindow())))
                                    dx = x2 - x1
                                    labelheight = dx/100
                            when(point
                                    hs=geCreateHilightSet(geGetWindowCellView()
                                            abDynamicDisplay.lpp || '("y4" "drawing"))
                                    geAddHilightLabel(
                                            hs
                                            point
                                            message

                                            abDynamicDisplay.justify || "centerCenter"
                                            abDynamicDisplay.orient || "R0"
                                            abDynamicDisplay.font || "roman"
                                            abDynamicDisplay.height || labelheight
                                            nil
                                    )
                                    hs->enable=t
                                    geRefresh()
                                    hiRegTimer("geDeleteAllHilightSet(geGetWindowCellView()) geRefresh()" 25)
                            )
                    )
        message = nil
    );procedure
    hiSetBindKey("Layout" "Ctrl<key>KP_Home" "BSreselectView1()")

    • 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