• 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. Allegro X PCB Editor
  3. Detect if form is already being displayed

Stats

  • Replies 4
  • Subscribers 159
  • Views 13224
  • Members are here 0
More Content

Detect if form is already being displayed

khuranav007
khuranav007 over 8 years ago

Hello, I have an Allegro Skill script that is invoked using a custom menu pick.  The skill script displays a form.  Problem is I don't know how to stop the form from displaying again when the user selects the menu pick.  Is there a built-in function that can be used to check to see if form is already being displayed?  If not, any other ideas?  Thanks for help!

  • Sign in to reply
  • Cancel
  • eDave
    eDave over 8 years ago

    This is how I do it:

    defun( xxxx ()
     prog((xxxx)
      when(boundp('my_form) && axlIsFormType(my_form) && axlUIWExpose(my_form), return())
      defvar(my_form)

    ...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • khuranav007
    khuranav007 over 8 years ago
    Thanks Dave. Can you please explain what these lines are doing? And, this is part of the same Skill script that invokes the form...?
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 8 years ago
    I just showed the defun and prog lines to show that you need to include the lines in a prog loop to be able to use return(). You can, of course, exit more cleanly than this if you object to using return().
    declaring myForm as global using defvar ensures that you can detect if it's called later.
    boundp('my_form) tells you whether the form has been used before in this session.
    axlIsFormType(my_form) tells you whether the form is still active (it will be nil if not).
    If it is active, axlUIWExpose(my_form) exposes the form and return() exits the function.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • khuranav007
    khuranav007 over 8 years ago
    Thanks Dave - appreciate the help very much.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Cadence Guidelines

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