• 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. Help on the use of hiCreateBooleanButton( ) function

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 142
  • Views 12499
  • 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

Help on the use of hiCreateBooleanButton( ) function

yankunRen
yankunRen over 4 years ago

Hello everyone:

   In   IC618.  I am having trouble making a skill tool menu。

When creating a button using the hiCreateBooleanButton() function,

When Guard Ring is selected, the following two items can be edited,As shown below:

When the Guard Ring is cancelled, the following two items cannot be edited,As shown below:

I know I need to modify the ?editable value, but I don't know how to connect them.

Code:

procedure(rkMatchForm()
      let((guard_ring button_ring space_left matchForm)
            button_ring = hiCreateBooleanButton(
                     ?name            'button_ring
                     ?buttonText    "Guard Ring"
                     ?defValue       t
                     ?callback        nil
                     ?buttonLocation    'left
                                                            );end button_ring
     guard_ring = hiCreateCyclicField(
                     ?name           'guard_ring
                     ?choices        mpp_list
                     ?defValue       "ntap"
                     ?prompt         "MPP Template:"
                     ?enabled        t
                     ?callback        nil
                                                          );end guard_ring
      space_left = hiCreateFloatField(
                     ?name           'space_left
                     ?prompt         "Left Spacing"
                     ?defValue      1.0
                     ?editable        t
                     ?callback       nil
                                                         );end space_left
      matchForm = hiCreateAppForm(
                     ?name             'matchForm
                     ?formTitle        "Match Options"
                     ?initialSize        t
                     ?callback         nil
                     ?fields list(
                                       list(button_ring 20:20 160:25 20)
                                       list(guard_ring 20:50 200:25 100)
                                       list(space_left 20:80 200:25 100)
                                     );end list
      ?unmapAfterCB t );end matchForm
      hiDisplayForm(matchForm)
      );end let
);end procedure

Thanks everyone

Jen

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    Jen,

    You can do this via a callback on the button_ring field. See the modified code below:

    ; for testing - not sure why this is global rather than being passed to
    ; rkMatchForm, but nevermind...
    unless(boundp('mpp_list)
        mpp_list=list("ntap" "ptap")
    )
    
    procedure(rkMatchForm()
          let((guard_ring button_ring space_left matchForm)
                button_ring = hiCreateBooleanButton(
                         ?name            'button_ring
                         ?buttonText    "Guard Ring"
                         ?defValue       t
                         ?callback      "rkMatchFormGuardRingCB(hiGetCurrentForm())"
                         ?buttonLocation    'left
                                                                );end button_ring 
         guard_ring = hiCreateCyclicField(
                         ?name           'guard_ring
                         ?choices        mpp_list
                         ?defValue       "ntap"
                         ?prompt         "MPP Template:"
                         ?enabled        t
                         ?callback        nil 
                                                              );end guard_ring
          space_left = hiCreateFloatField(
                         ?name           'space_left
                         ?prompt         "Left Spacing"
                         ?defValue      1.0
                         ?editable        t
                         ?callback       nil 
                                                             );end space_left
          matchForm = hiCreateAppForm(
                         ?name             'matchForm
                         ?formTitle        "Match Options"
                         ?initialSize        t
                         ?callback         nil
                         ?fields list( 
                                           list(button_ring 20:20 160:25 20) 
                                           list(guard_ring 20:50 200:25 100)
                                           list(space_left 20:80 200:25 100) 
                                         );end list
          ?unmapAfterCB t );end matchForm
          hiDisplayForm(matchForm)
          );end let
    );end procedure
    
    procedure(rkMatchFormGuardRingCB(form)
        let((ring)
            ring=form->button_ring->value
            hiSetFieldEnabled(form->guard_ring ring)
            hiSetFieldEnabled(form->space_left ring)
        )
    )
    
    

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yankunRen
    yankunRen over 4 years ago in reply to Andrew Beckett

    Thank you very much,Andrew

    According to your method, I realized this function, thank you

    yankunRen

    • 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