• 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. How to expand/contract multiple voids at the same time?

Stats

  • State Suggested Answer
  • Replies 5
  • Answers 2
  • Subscribers 159
  • Views 1015
  • Members are here 0
More Content

How to expand/contract multiple voids at the same time?

Judeeeee
Judeeeee 5 months ago

Hi allegro experts!

Can you help me with this. Thanks!

How to expand/contract multiple voids at the same time? is there script needed for this command?

  • Sign in to reply
  • Cancel
  • vidhyaparameswari
    +1 vidhyaparameswari 5 months ago

    Hi Judeeeee,

    The multiple voids cannot be expanded or contracted in  a single go. I will check if we make it with the help of script.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Judeeeee
    0 Judeeeee 5 months ago in reply to vidhyaparameswari

    Noted. Please help me with the script. Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • vidhyaparameswari
    0 vidhyaparameswari 5 months ago in reply to Judeeeee

    Hi Judeeeee,

    I have checked the possibility of creating script for editing the voids. If you record a script for creating voids in one board file, it is recorded based on the co ordinates, so the same recorded file cannot be used for another board file.

    While looking through the CCR's, there are request in queue to have an option to select 'Next' using RMB, so that voids can be selected consecutively to expand/contract based on the requirement while the command is still active.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • DavidJHutchins
    0 DavidJHutchins 5 months ago

    I wrote a simple skill routine to resize voids in static shapes ( it won't work on dynamic shapes )

    below is the skill code:

    procedure((resize_voids size)
    let((child parent VoidList oldPolys NewPolys AddPolys NewShp)
    if(or(fixp(size) floatp(size)) then
    (axlSetFindFilter ?enabled list("noall" "voids") ?onButtons list("noall" "voids"))
    (axlClearSelSet)
    (axlAddSelectBox)
    axlMsgPut("%d voids selected" length(axlGetSelSet()))
    when(axlGetSelSet()
    (child = car(axlGetSelSet()))
    (parent = child->parent)
    when(parent->parentGroups
    axlClearSelSet()
    axlMsgPut("Can not edit Voids in Dynamic Shapes")
    )
    (parent = nil)
    )
    when(axlGetSelSet()
    (VoidList = axlGetSelSet())
    (axlClearSelSet)
    foreach(dbid VoidList
    unless(parent
    (parent=dbid->parent)
    (NewShp = axlDBOpenShape(parent nil))
    )
    (oldPolys = axlPolyFromDB(dbid))
    ;axlMsgPut("%d oldPolys" length(oldPolys))
    (AddPolys = list())
    foreach(poly oldPolys
    (newPolys = axlPolyExpand(poly size 'none))
    foreach(new newPolys
    (AddPolys = cons(new AddPolys))
    )
    )
    ;axlMsgPut("%d newPolys" length(newPolys))
    axlShapeDeleteVoids(dbid)
    foreach(poly AddPolys
    axlDBCreateVoid(NewShp poly)
    )
    )
    axlDBCreateCloseShape(NewShp)
    )
    else
    axlMsgPut("input value was not an int or float")
    )
    )
    )

    Below are the commands in Allegro:

    skill 'load "resize_voids.ils"'

    skill 'resize_voids -1'

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 4 months ago

    Hi Judeeeee!

    You can refer to it. It works with dynamic shapes only.

    Best regards,

    HoangKhoi

    ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    axlCmdRegister("expand_void_shape" `expand_void_shape)
    exp_value_float = 0.0
    (defun de_expand_void ()
    exp_value = axlUIPrompt("Enter the cutout size :" )
    if(exp_value != nil && atof(exp_value) != 0.0 then
    exp_value_float = atof(exp_value)
    )
    )
    (defun de_contrac_void ()
    exp_value = axlUIPrompt("Enter the cutout size :" )
    if(exp_value != nil && atof(exp_value) != 0.0 then
    exp_value_float = atof(exp_value) * -1.0
    )
    )
    (defun expand_void_shape ()
    if(axlVersion('version) >= 17.2 then
    axlSetFindFilter(?enabled '(noall VOIDS NAMEFORM) ?onButtons '(noall ALL))
    mypopup = axlUIPopupDefine(nil (list (list "Done" 'axlFinishEnterFun) (list "Cancel" 'axlCancelEnterFun) list("MENU_SEPARATOR" nil) (list "Expand" 'de_expand_void) (list "Contraction" 'de_contrac_void)))
    axlUIPopupSet( mypopup)
    while(axlSelect(?prompt "Please select an element...")
    Input_List = axlGetSelSet()
    axlClearSelSet()
    if(exp_value_float != 0.0 then
    tmp_list = nil
    foreach(void Input_List
    if(void->objType != nil then
    shape_parent = void->parent
    tmp = setof(e Input_List e->parent == shape_parent)
    poly_list = nil
    foreach(item setof(e tmp member(e tmp_list) == nil)
    tmp_list = cons(item tmp_list)
    poly = car(axlPolyFromDB(item ?endCapType 'ROUND))
    poly_list = cons(poly poly_list)
    )
    if(poly_list != nil then
    foreach(void2 shape_parent->shapeBoundary->voids
    poly = car(axlPolyFromDB(void2 ?endCapType 'ROUND))
    foreach(_poly poly_list
    if(poly->bBox == _poly->bBox then
    axlShapeDeleteVoids(void2)
    )
    )
    )
    axlSetFindFilter(?enabled '(noall SHAPES NAMEFORM) ?onButtons '(noall ALL))
    foreach(poly poly_list
    axlAddSelectPoly(poly t)
    )
    new_shape = car(axlGetSelSet())->shapeBoundary
    axlClearSelSet()
    if(new_shape != nil then
    openShape = axlDBOpenShape(new_shape)
    foreach(poly axlPolyExpand(poly_list exp_value_float 'NONE)
    axlDBCreateVoid(openShape, poly)
    )
    openShape = axlDBCreateCloseShape(openShape)
    )
    )
    )
    )
    axlSetFindFilter(?enabled '(noall VOIDS NAMEFORM) ?onButtons '(noall ALL))
    )
    )
    )
    printf("Version 1.0 - Last update: 08/04/2025\n")
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • 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