• 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. Checklist Autofill

Stats

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

Checklist Autofill

eddieb1
eddieb1 over 11 years ago
Hello experts,

Need your help on how to do the following.

1. Run command to look for the Jconnectors (J01, J02...J80)  on a brd file.

2. Place a checkmark on the checklist box identfying the Jconnectors found.

3. Deactivate (grayed out) checkbox of Jconnectors not found.

4. Run a command to delete the Via KO Shape on the Jconnectors found (using a known x-y location). -- Use Apply to run the delete command.

5. Click OK button to finish/close the UI checklist form.

 Note:

If you can see the jpg below, that's the checklist form that I'm planning on using.


How do I go about this?

Thanks in advance,

Eddie
  • Sign in to reply
  • Cancel
  • eDave
    eDave over 11 years ago

    Hi Eddie,

    I can't see your jpeg but I am assuming that you already have a form with the appropriately named fields.

    Here's some (unverified) code to get you going:

    defun( Eddie_stripJviaKO (formFile)

     let((form, symbols, fieldName)

    form = axlFormCreate(gensym(), formFile, nil, 'Eddie_stripJviaKO_callBack, nil)

     

    ; 1. Run command to look for the Jconnectors (J01, J02...J80)  on a brd file.

    symbols = setof(s, axlSelectByName("REFDES", "J??", t), rexMatchp("J[0-8][0-9]", s ->refdes))

     

    for(i, 1, 80

    fieldName = strcat("J", substring(sprintf(nil, "0%d", i), -2))

    if(exists(s, symbols, s ->refdes == fieldName) then

    ; 2. Place a checkmark on the checklist box identfying the Jconnectors found.

    axlFormSetField(form, fieldName, t)

    axlFormSetFieldEditable(form, fieldName, t)

    else

    ; 3. Deactivate (grayed out) checkbox of Jconnectors not found.

    axlFormSetField(form, fieldName, nil)

    axlFormSetFieldEditable(form, fieldName, nil)

    )

    )

    axlFormDisplay(form)

    ))

     

    ; Callback:

    defun( Eddie_stripJviaKO_callBack (form)

     let((symbol)

    case(form ->curField

    ; 4. Run a command to delete the Via KO Shape on the Jconnectors found (using a known x-y location). -- Use Apply to run the delete command.

    ("apply"

    foreach(field, setof(f, form ->fields, rexMatchp("J[0-8][0-9]", f) && axlFormGetField(form, f))

    symbol = car(axlSelectByName("REFDES", field, t))

    axlDeleteObject(setof(shp, symbol ->children, shp ->layer == strcat("VIA KEEPOUT/", if(symbol ->isMirrored, "BOTTOM", "TOP"))))

    )

    )

    ("ok"

    ; 5. Click OK button to finish/close the UI checklist form.

    axlCancelEnterFun(), axlFormClose(form)

    )

    )

    )) 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eddieb1
    eddieb1 over 11 years ago

     Thanks Dave for the reply.

    I'll take your code for a spin and let you know the results asap.

    In the meantime I'm attaching the link to the jpg fileJconn. Hopefully it will not get filtered out.

     

    Edit:

     

    1. Run command (by clicking a button - see JPG) to look for the Jconnectors (J01, J02...J80)  on a brd file.

     

    Updated the jpg file as the one I posted was an older version.

     

    https://www.dropbox.com/s/69wvsg4iudxdvcb/jconn1.JPG

     

     Regards,

    Eddie

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eddieb1
    eddieb1 over 11 years ago

     Hi Dave,

    I can't seem to get this code to run. It might be because my unfamiliarity with the defun command (still new at this). Been exposed to the procedure function. Tip or two to get the form to launch?

     

    Thanks,

    Eddie

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 11 years ago

    Hi Eddie,

    The code won't run without some work.

    defun is similar to procedure. Just don't change my white spaces.

    I assume that you have a form file?

    This discussion might be better off line. dave.elder@taitradio.com 

    • 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