• 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. Help in axlFormCreate

Stats

  • Replies 4
  • Subscribers 160
  • Views 14716
  • Members are here 0
More Content

Help in axlFormCreate

luanvn81
luanvn81 over 5 years ago

Hi all!

I have a problem with my form code as below.

here my code 

axlCmdRegister( "testfm" `get_database )
(defun get_database ()
axlSetFindFilter(?enabled '(noall VIAS NAMEFORM) ?onButtons '(noall VIAS))
axlVisibleDesign(nil)
axlVisibleLayer("VIA CLASS" t)
axlClearSelSet()
AllVias_check = axlGetSelSet(axlAddSelectAll())
axlClearSelSet()
test_frm()
);end defun

form = nil
(defun test_frm ()
Out_File_Form = outfile("./test_frm.form" "w")
.........
close(Out_File_Form)
form = axlFormCreate((gensym) "test_frm.form" nil '_form_Action t)
axlFormAutoResize(form)
axlFormDisplay(form)
);end defun form main

(defun _form_Action (form)
case(form->curField
("start"
printf("test %L\n", AllVias_check)
);end case start
...........
);end case all
);end defun

The problem occur when I click on Start button, variable "AllVias_check" return dbid: removed. But if I change  '_form_Action t  into '_form_Action nil  variable "AllVias_check" return list of dbib.  Please help me to understand it.

  • Sign in to reply
  • Cancel
  • leto
    leto over 5 years ago

    Hello Luan,

    Maybe the non-blocking form allows some other process that clears the dbid.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • B Bruekers
    B Bruekers over 5 years ago

    What is your goal with this code?

    First you select VIAs and after bring up a form. But what do you want to do next?

    The dbid removed has indeed to do with the non-blocking form. , When get_database() is finished Allegro returns to 'idle'. Since this code is called from the command line with 'testfm' the selection set and dbids are cleared at the moment it returns.

    If you call  get_database()  directly from the SKILL prompt the dibd's will most likely stay valid, until you do a 'done' or start another command in Allegro.

    Perhaps this is an other option: use a mini-status form ('options'  window) and use a while loop with axlEnterEvent() to do whatever you need to do. During this axlEnterEvent() the selection and dbids are valid.

    Look into the axlMiniStatusLoad() and axlEnterEvent() API description.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • luanvn81
    luanvn81 over 5 years ago in reply to B Bruekers

    Hi Bruekers!

    Thank for your reply.  I have resolved my problem. As your advice,  the dbib removed is caused by non-blocking form  and  calling 'testfrm'  after  get_database()  make dbids are cleared.

    By the way, my code use to check  via types (with different sizes)  is not allow exist in out of constraint region.

    Thank you.

    Luan.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • luanvn81
    luanvn81 over 5 years ago in reply to leto

    Hi Leto!

    You are right, the non-blocking form cause the dbids are  cleared. And my code works.

    Thank you.

    Luan.

    • 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