• 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. enterBox() used to option form

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 143
  • Views 3163
  • 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

enterBox() used to option form

Yush
Yush over 1 year ago

hi, 

I 'm confused about the post: community.cadence.com/.../how-to-store-values-for-the-form-fields

1. is there any ways to keep not display the form when commands repeat?

2. When I replace the button with ApplyHideCancel, does the program execute as:

    testDoneProc(win done bBox)   =>   done -> t  ;  bBox  ->  nil

the code copied from the above post:

procedure(testDoneProc(wid done box)
  ;----------------------------------------------------------------------
  ; don't do anything if cancelled
  ;----------------------------------------------------------------------
  when(done
    printf("%L\n" box)
    if(optionsForm->Type->value == "type1" then printf("%L\n" car(box)))
    if(optionsForm->Type->value == "type2" then printf("%L\n" cadr(box)))
    ;--------------------------------------------------------------------
    ; enterBox doesn't seem to honour modalCommands itself ("Repeat Commands"
    ; on the Editor Options form) so achieve the same thing
    ; by enqueuing the original command again
    ;--------------------------------------------------------------------
    when(envGetVal("layout" "modalCommands")
      hiEnqueueCmd("test()")
    )
  )
)
procedure(test()
  let((optionsForm box)
    cv=geGetEditCellView()
    ;--------------------------------------------------------------------
    ; Only create the form if it doesn't exist already; always
    ; stored in a global variable, so make sure the name is unique
    ;--------------------------------------------------------------------
    unless(boundp('CCFuniqueOptionsForm)
      ;------------------------------------------------------------------
      ; hiCreateAppForm has more control than hiCreateOptionsForm
      ;------------------------------------------------------------------
      hiCreateAppForm(
        ?name 'CCFuniqueOptionsForm
        ?formTitle "Options"
        ?formType 'options
        ?fields list(
          hiCreateRadioField(
            ?name 'Type
            ?prompt "Type"
            ?choices list("type1" "type2")
          );end Type 
        );end list
        ;----------------------------------------------------------------
        ; Control buttons and initial form size
        ;----------------------------------------------------------------
        ?buttonLayout 'HideCancelDef
        ?initialSize 300:60
      );end optionsForm
    )
    optionsForm=CCFuniqueOptionsForm

    ;--------------------------------------------------------------------
    ; Moved the processing into the doneProc
    ;--------------------------------------------------------------------
    box = enterBox(
      ?form eval(optionsForm)
      ?doneProc "testDoneProc"
    )
  );end let
);end procedure

hiSetBindKey("Layout" "<Key>z" "test()")
  • 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