• 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. GUI basic function errors

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 13237
  • 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

GUI basic function errors

uppalanchi
uppalanchi over 5 years ago
Hi all,

I am writing a skill code in order to load the bind keys of my choice using a popup. For that purpose i have written following code

but, i am facing errors while running in virtuoso 6-1-6-64b, & i am very new to skill coding

The errors are:
1.I am unable to close the pop up window( want to know the functionality of buttons like OK,cancel,apply & help)
2. the selected items are not storing in variable "i"

any suggestion or help regarding the issue is appreciated.

how can i get the more info for gui creation.



CODE:


my_frame_fld = hiCreateFrameField(
?name 'my_frame_fld
?labelText "selction_window"
?enabled t)
my_combo_fld = hiCreateComboField(
?name 'my_combo_fld
?prompt "tech_selcet"
?items '("gf28" "gpdk45" "tsmc130" )
?enabled t)
my_form = hiCreateAppForm(
?callback "callback_fun()"
?name ‘my_form
?formTitle "Bindkeys"
?buttonLayout '(OKCancelApply)
?fields list(
list(my_frame_fld (10:10) (450:100) 100)
list(my_combo_fld (30:40) (425:10) 100)
)
?initialSize t)
hiDisplayForm(my_form)
procedure(callback_fun()
i=my_form~>my_combo_fld~>value
if((i=="gf28")
then
load("home/Desktop/123/28nmbindkeys.il")
printf("done 28nmbindkeys file ")
)
if((i=="gpdk45")
then
load("home/Desktop/123/45nmbindkey.il")
printf("done 45nmbindkeys file ")
)
if((i=="tsmc130")
then
load("home/Desktop/123/130nmbindkey.il")
printf("done 130nmbindkeys file ")
)
)
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    I reformatted the code slightly to make it easier to read.

    I moved the callback function definition to be before the hiDisplayForm - as that will block and so the callback wouldn't have been defined. With that, it all worked OK (I commented out the actual load lines as I didn't have the files available). I then made i a local variable as it's not a good idea for it to be global (that said, the code worked without that). 

    procedure(callback_fun()
      let((i)
        i=my_form~>my_combo_fld~>value
        if((i=="gf28") then
            ;load("home/Desktop/123/28nmbindkeys.il")
            printf("done 28nmbindkeys file ")
        )
        if((i=="gpdk45") then
            ;load("home/Desktop/123/45nmbindkey.il")
            printf("done 45nmbindkeys file ")
        )
        if((i=="tsmc130") then
            ;load("home/Desktop/123/130nmbindkey.il")
            printf("done 130nmbindkeys file ")
        )
      )
    )
    
    my_frame_fld = hiCreateFrameField(
        ?name 'my_frame_fld
        ?labelText "selction_window"
        ?enabled t
        )
    my_combo_fld = hiCreateComboField(
        ?name 'my_combo_fld
        ?prompt "tech_selcet"
        ?items '("gf28" "gpdk45" "tsmc130" )
        ?enabled t
        )
    my_form = hiCreateAppForm(
        ?callback "callback_fun()"
        ?name 'my_form
        ?formTitle "Bindkeys"
        ?buttonLayout '(OKCancelApply)
        ?fields list(
            list(my_frame_fld (10:10) (450:100) 100)
            list(my_combo_fld (30:40) (425:10) 100)
        )
        ?initialSize t
        )
    hiDisplayForm(my_form)

    So this all works OK. Not sure what your problem is? If the form is not being removed, did you by any chance put this within a block of code where my_frame_fld is defined in a let() and so is local?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    I reformatted the code slightly to make it easier to read.

    I moved the callback function definition to be before the hiDisplayForm - as that will block and so the callback wouldn't have been defined. With that, it all worked OK (I commented out the actual load lines as I didn't have the files available). I then made i a local variable as it's not a good idea for it to be global (that said, the code worked without that). 

    procedure(callback_fun()
      let((i)
        i=my_form~>my_combo_fld~>value
        if((i=="gf28") then
            ;load("home/Desktop/123/28nmbindkeys.il")
            printf("done 28nmbindkeys file ")
        )
        if((i=="gpdk45") then
            ;load("home/Desktop/123/45nmbindkey.il")
            printf("done 45nmbindkeys file ")
        )
        if((i=="tsmc130") then
            ;load("home/Desktop/123/130nmbindkey.il")
            printf("done 130nmbindkeys file ")
        )
      )
    )
    
    my_frame_fld = hiCreateFrameField(
        ?name 'my_frame_fld
        ?labelText "selction_window"
        ?enabled t
        )
    my_combo_fld = hiCreateComboField(
        ?name 'my_combo_fld
        ?prompt "tech_selcet"
        ?items '("gf28" "gpdk45" "tsmc130" )
        ?enabled t
        )
    my_form = hiCreateAppForm(
        ?callback "callback_fun()"
        ?name 'my_form
        ?formTitle "Bindkeys"
        ?buttonLayout '(OKCancelApply)
        ?fields list(
            list(my_frame_fld (10:10) (450:100) 100)
            list(my_combo_fld (30:40) (425:10) 100)
        )
        ?initialSize t
        )
    hiDisplayForm(my_form)

    So this all works OK. Not sure what your problem is? If the form is not being removed, did you by any chance put this within a block of code where my_frame_fld is defined in a let() and so is local?

    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