• 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 map a docked form to layout/schematic?

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 2624
  • 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 map a docked form to layout/schematic?

gopalk07
gopalk07 over 5 years ago

Hi,

I have designed a main form having buttons for bunch of scripts. Each button opens up another form (script's form) to receive user inputs and then performs the operation in layout/schematic.

So, in order to avoid floating of multiple forms, i created  both the main form and the  script's form as docked windows into a session window.

But the issue is script's form is now not mapped to the layout/schematic window, instead it treats the docked window  as current window. 

How could I map the docked script's form to perform operation in layout/schematic?

Thanks for your help.

I have referenced the below solution for creating the docked form in window.

https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nSaaEAE

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    It's unclear what you've implemented and what you're asking. I initially thought you'd added a docked window to your layout/schematic window, but it sounds as if you have created a separate session window with docked windows within, and you want hiGetCurrentWindow() to still refer to the separate layout/schematic window? If so, you can do so by having your new window (with the form) marked as neverCurrentWindow. ie. windowId~>neverCurrentWindow=t . Note that if you do that, any callbacks you have within your new form window can't use hiGetCurrentWindow() to refer to themselves - you'd probably need to build the callbacks as you're building the form and window so that they are something like:

    sprintf(nil "doSomething(window(%d))" windowId~>windowNum)

    Sorry if this doesn't make sense, but I'm having to do an awful lot of guesswork as you've not clearly explained what you've done and what you expect. If you'd provided  your code, that might have made it easier, ideally with enough data to understand your expected use model.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • gopalk07
    gopalk07 over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thank you for your reponse. 

    After making the new window as neverCurrentWindow, I am able to get the desired output.

    But I am having difficulty in building the callbacks to refer to current window. For example, hiCloseWindow function requires current window ID. As hiGetCurrentWindow() couldn't be used, I have used the session window ID. I have made Session window ID as global variable. Is my approach right? If not, would you please explain the process to build callback using the below example code.

    Thanks again.

     
    procedure( createMainWindow()
    let((win1 dock_main )

    swin_exampleGUI = hiCreateWindow(nil "session" "Container Window")
    hiCreatePulldownMenu(
    'mainWindowMenu
    "&File"
    list(
    hiCreateMenuItem(
    ?name 'close
    ?itemText "&Close"
    ?callback "hiCloseWindow(swin_exampleGUI)"
    )
    )
    )
    hiInsertBannerMenu( swin_exampleGUI mainWindowMenu 1)


    unless(boundp('mainForm)
    createMainForm()
    )

    win1 = hiCreateWindow(nil "text" "Example Window")


    dock_main = hiCreateDockWindow(

    ?appType "Main Form GUI"
    ?widgetType "form"
    ?handle 'mainFormGUI
    ?form mainForm
    ?title "Main Form"
    )

    hiDockWindow(
    ?window dock_main
    ?session swin_exampleGUI
    ?side 'left
    )
    hiDisplayWindow( win1 swin_exampleGUI)
    win1 -> neverCurrentWindow = t
    )
    )


    procedure( createMainForm()
    let((goToXYButton)

    goToXYButton = hiCreateButton(
    ?name 'goTo_button
    ?buttonText "Go To"
    ?callback "goToXY()"
    )

    hiCreateAppForm(
    ?name 'mainForm
    ?formTitle "Main form"
    ?fields list(
    list(goToXYButton 10:200 100:30)
    )
    )


    mainForm
    )
    )


    procedure( goToXY()
    let( ( point zoomLevel dock_goToXY)

    point = ""
    zoomLevel = ""


    point = hiCreateStringField(
    ?name 'point
    ?prompt "Enter X,Y"
    ?value point
    )


    zoomLevel = hiCreateStringField(
    ?name 'zoomLevel
    ?prompt "Zoom Level"
    ?value zoomLevel
    ?defValue "100"
    )

    applyButton = hiCreateButton(
    ?name 'applyButton
    ?buttonText "Apply"
    ?callback "goToXYProc()"
    )

    goToXYForm = hiCreateAppForm(
    ?name 'goToXYForm
    ?formTitle "Go To XY"
    ?initialSize t
    ?fields list(
    list(point 10:0 300:40 100 )
    list(zoomLevel 10:30 150:40 100 )
    list(applyButton 10:70 40:25 )
    )
    )
    ;hiDisplayForm(goToXYForm)


    dock_goToXY = hiCreateDockWindow(

    ?appType "goToXy Window"
    ?widgetType "form"
    ?handle 'win_goToXY
    ?dockSizeHint list(350 100)
    ?form goToXYForm
    ?title "Go To"
    )

    hiDockWindow(
    ?window dock_goToXY
    ?session swin_exampleGUI
    ?side 'right
    )
    )
    )


    procedure( goToXYProc()
    let( (xValue yValue convertPoint)

    if(goToXYForm->point->value ==""
    then
    hiModalDBoxHelp("Enter Correct X and Y Values")
    else

    xValue = nil
    yValue = nil

    xValue = car(parseString(goToXYForm->point->value ",") )
    yValue = cadr(parseString(goToXYForm->point->value ",") )
    hiPan(hiGetCurrentWindow() list(aelNumber(xValue) aelNumber(yValue)))

    hiZoomRelativeScale(hiGetCurrentWindow() aelNumber(goToXYForm->zoomLevel->value) )

    convertPoint = geWindowToEditPoint(hiGetCurrentWindow() list(aelNumber(xValue) aelNumber(yValue)))
    leSetRefPoint(geGetEditCellView() convertPoint)
    leMoveCursorToRefPoint()
    )
    )
    )

    • 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