• 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 get Windows Number? or how to Set a WIndow new Window...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 6596
  • 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 get Windows Number? or how to Set a WIndow new Window number?

alaylayla
alaylayla over 1 year ago

Window : number,how i get and change the number? 

I see the second number  in context  attribute is same as window numbe

what's meaning and function of context attribute in window ID ?

Virtuoso 618

  • Cancel
Parents
  • AurelBuche
    AurelBuche over 1 year ago

    Hi, 

    I don't believe that you can change the window id number, it is managed by Virtuoso directly

    To extract it, you can do the following : 

    ;; My window shows 5(13) in its bottom left corner
    ;; It displays a schematic cellview and other dockable windows (also called assistants)
    
    ;; From support.cadence.com/.../ArticleAttachmentPortalt
    ;; "SKILL procedure to have only the window number returned"
    procedure( getWinNum()
       window=hiGetCurrentWindow()
       window->windowNum
    )
    
    ;; Other solution is to extract the number directly from window representation
    (defun get_win_number (win)
      (atoi (cadr (parseString (lsprintf "%L" win) ":"))))
    
    ;; Current window (the one showing the cellview)
    win = (hiGetCurrentWindow)
    win->windowNum
    ;; => 13
    (get_win_number win)
    ;; => 13
    
    ;; Session window (it contains the main window and the dockable ones)
    swin = (hiGetSessionWindow win)
    ;; Unfortunately in my case the following does not work
    swin->windowNum
    ;; => -2147483643
    (get_win_number swin)
    ;; => 5

    Hope this helps

    Aurélien

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to AurelBuche

    Further to Aurélien's excellent feedback, most of the time you deal with windowIds (such as returned by hiGetCurrentWindow) - there aren't many cases where you need the window number. About the only scenario is if you need to construct a string callback (for something that doesn't support closures, say) which references a window id - in that case you might doing something like lsprintf("hiRaiseWindow(window(%d))" windowId->windowNum) .

    Why would you want t change the window number? You can't do this, but I'm intrigued as to why you might want to do this.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to AurelBuche

    Further to Aurélien's excellent feedback, most of the time you deal with windowIds (such as returned by hiGetCurrentWindow) - there aren't many cases where you need the window number. About the only scenario is if you need to construct a string callback (for something that doesn't support closures, say) which references a window id - in that case you might doing something like lsprintf("hiRaiseWindow(window(%d))" windowId->windowNum) .

    Why would you want t change the window number? You can't do this, but I'm intrigued as to why you might want to do this.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • alaylayla
    alaylayla over 1 year ago in reply to Andrew Beckett
    Thanks !!!
    I just want to change the size of the winddow. I found that the hiRaiseWindow function needs the window number parameter; but I didn't find the window number parameter through "windowID~ >?"; that's why I wanted to use hiRaiseWindow by directly giving the window a new window number such as "999". Now, I know that you can get the window number through "windowID~ > windowNum", so I don't need to do that. But I'm very confused, why can't I see windowNum in the result returned by "window ID~ >?", I almost got the window number by getting the second number of the context parameter in windowID.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to alaylayla
    alaylayla said:
    I found that the hiRaiseWindow function needs the window number paramete

    The hiRaiseWindow function does not need a window number. It needs a windowId such as returned by various functions such as deOpen(), geOpen(), hiGetCurrentWindow(), hiGetWindowList() etc.

    I agree that windowID->? doesn't list the built-in attributes such as windowNum - it only lists the user-defined properties on the window. That's a bit confusing, I agree entirely. However, as I mentioned before you rarely need to use the window number.

    Andrew

    • 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