• 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 create dockable form in skill

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 143
  • Views 17667
  • 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 create dockable form in skill

RushMehta
RushMehta over 14 years ago

Hello,

I am trying to create a dockable form so that it can be docked to existing schematic window.

I am able to create popup gui using hiCreateAppForm and hiDisplayForm. When hiDisplayForm is  executed skill code stays there till the form is closed using 'close' button.
However that's not true when I dock it.

I used hiCraeteDockWindow and hiDockWindow functions to successfully dock the form.  After executing hiDockWindow, skill code goes to next line and it will eventually exit the code. Which means the form is docked in schematic but its non-functional now as it can't reference any variables.

How do I keep the skill code alive after docking the form ? Or is there any other way to achieve the docked form ?

Thanks in advance,

Rushang 

 

  • Cancel
Parents
  • RushMehta
    RushMehta over 14 years ago

    Hi Andrew,

     I suspect the same but couldn't get it to work without using global variables. And I want to avoid using global variables as users may have more than one schematic open with such docked form.

    My code is too big with many procedures defined in it. But here is a scaled down version which shows the problem.

    In the code popupform() functions correctly but dockform() throws error in CIW when user click load file button. For dockform() to work you need to have a schematic (or any session) window open

    procedure( popupform()
        let( (fileLocation loadFileButton myForm)
            fileLocation = hiCreateFileSelectorField(
                    ?name           'fileLocation
                    ?mode           'existingFile
                    ?prompt         "Choose a file"
                    ?editable       t)

            loadFileButton = hiCreateButton(
                    ?name           'loadFileButton
                    ?buttonText     "Load File"
                    ?callback       "printf(\"Loading file from popup form %s\n\" fileLocation->value)")

            myForm = hiCreateAppForm(
                    ?name           'myForm
                    ?formTitle      "My Form which should be popup"
                    ?buttonLayout   'Close
                    ?fields         list( list(fileLocation 10:10 400:20 100)
                                            list(loadFileButton 415:10 80:30))
                    ?unmapAfterCB           t)

            hiDisplayForm(myForm)
        ); let
    )

    procedure( dockform()
        let( (fileLocation loadFileButton swin myForm2 dockForm myDock)
            fileLocation = hiCreateFileSelectorField(
                    ?name           'fileLocation
                    ?mode           'existingFile
                    ?prompt         "Choose a file"
                    ?editable       t)

            loadFileButton = hiCreateButton(
                    ?name           'loadFileButton
                    ?buttonText     "Load File"
                    ?callback       "printf(\"Loading file from docked form %s\n\" fileLocation->value)")

            swin = hiGetSessionWindow(hiGetCurrentWindow())
            myForm2 = hiCreateAppForm(
                    ?name           'myForm2
                    ?formTitle      "My Form which should be docked"
                    ?buttonLayout   'Close
                    ?fields         list( list(fileLocation 10:10 400:20 100)
                                            list(loadFileButton 415:10 80:30))
                    ?unmapAfterCB           t)
            dockForm = hiCreateDockWindow(
                    ?appType        "Docked Form"
                    ?widgetType     "form"
                    ?handle         'dockedForm
                    ?title          "Docked Form"
                    ?form           myForm2)
            myDock = hiDockWindow(
                    ?window         dockForm
                    ?session        swin
                    ?side           'right)
        ); let
    )
     

    Thanks for looking into this.

     Rushang

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

    Hi Andrew,

     I suspect the same but couldn't get it to work without using global variables. And I want to avoid using global variables as users may have more than one schematic open with such docked form.

    My code is too big with many procedures defined in it. But here is a scaled down version which shows the problem.

    In the code popupform() functions correctly but dockform() throws error in CIW when user click load file button. For dockform() to work you need to have a schematic (or any session) window open

    procedure( popupform()
        let( (fileLocation loadFileButton myForm)
            fileLocation = hiCreateFileSelectorField(
                    ?name           'fileLocation
                    ?mode           'existingFile
                    ?prompt         "Choose a file"
                    ?editable       t)

            loadFileButton = hiCreateButton(
                    ?name           'loadFileButton
                    ?buttonText     "Load File"
                    ?callback       "printf(\"Loading file from popup form %s\n\" fileLocation->value)")

            myForm = hiCreateAppForm(
                    ?name           'myForm
                    ?formTitle      "My Form which should be popup"
                    ?buttonLayout   'Close
                    ?fields         list( list(fileLocation 10:10 400:20 100)
                                            list(loadFileButton 415:10 80:30))
                    ?unmapAfterCB           t)

            hiDisplayForm(myForm)
        ); let
    )

    procedure( dockform()
        let( (fileLocation loadFileButton swin myForm2 dockForm myDock)
            fileLocation = hiCreateFileSelectorField(
                    ?name           'fileLocation
                    ?mode           'existingFile
                    ?prompt         "Choose a file"
                    ?editable       t)

            loadFileButton = hiCreateButton(
                    ?name           'loadFileButton
                    ?buttonText     "Load File"
                    ?callback       "printf(\"Loading file from docked form %s\n\" fileLocation->value)")

            swin = hiGetSessionWindow(hiGetCurrentWindow())
            myForm2 = hiCreateAppForm(
                    ?name           'myForm2
                    ?formTitle      "My Form which should be docked"
                    ?buttonLayout   'Close
                    ?fields         list( list(fileLocation 10:10 400:20 100)
                                            list(loadFileButton 415:10 80:30))
                    ?unmapAfterCB           t)
            dockForm = hiCreateDockWindow(
                    ?appType        "Docked Form"
                    ?widgetType     "form"
                    ?handle         'dockedForm
                    ?title          "Docked Form"
                    ?form           myForm2)
            myDock = hiDockWindow(
                    ?window         dockForm
                    ?session        swin
                    ?side           'right)
        ); let
    )
     

    Thanks for looking into this.

     Rushang

    • 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