• 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. Via Overlap

Stats

  • Replies 2
  • Subscribers 161
  • Views 14867
  • Members are here 0
More Content

Via Overlap

karthikeyan123
karthikeyan123 over 4 years ago

Hi,

I am having one via overlapped code but while running it shows error can any one correct the code and send me back please.

procedure(viaovrlapp()
via_overlay = list()
layername = nil
etchparam = axlGetParam("paramLayerGroup:ETCH")
layername = etchparam->groupMembers
print(layername)
axlSetFindFilter(?enabled `("NOALL") ?onButtons `("NOALL"))
axlSetFindFilter(?enabled `("NOALL" "ALLTYPES") ?onButtons `("vias"))
foreach(1name layername
 print("a")
 if(axlDBGetLayerType(sprintf(nil, "ETCH/%s", 1name)) == "CONDUCTOR" then
  axlVisibleDesign(nil)
  axlVisibleLayer(sprintf(nil, "VIA CLASS/%s"), 1name)
  axlAddSelectAll()
  objs = axlGetSelSet()
  axlClearSelSet()
  
  foreach(obj_via objs
   print("b")
   if(axlSingleSelectBox(obj_via -> bBox) then
    area_via = axlGetSelSet()
    axlClearSelSet()
    via_pad = axlDBGetPad(obj_via sprintf(nil "CONDUCTOR/%s" 1name) "REGULAR")
    via_padstack = via_pad ->bBox
    o_radius = abs(car(nth(0 via_padstack)) - car(nth(1 via_padstack))) / 2.0
    
    if(length(area_via) > 1 then
     foreach(a_via area_via
      print("c")
      via_pad = axlDBGetPad(a_via sprintf(nil "CONDUCTOR/%s" 1name) "REGULAR")
      via_padstack = via_pad ->bBox
      a_radius = abs(car(nth(0 via_padstack)) - car(nth(1 via_padstack))) / 2.0
      wid = o_radius + a_radius
      gap = abs(axlDistance(obj_via -> xy , a_via -> xy))
      wid = round(wid = 1000) / 1000.0
      gap = round(gap = 1000) / 1000.0
        if(gap > 0.001 && gap < wid then
         airgap = nth(2 axlAirGap(obj_via a_via 1name nil))
         if(airgap == 0.0 then
          via_overlay = append(via_overlay list(1name, obj_via ->xy))
          print(via_overlay)
         )
         ))))))) 
)
  • Sign in to reply
  • Cancel
Parents
  • luanvn81
    luanvn81 over 4 years ago

    Hi! 

    You can test this code, but I think this code need more repair.

    procedure(viaovrlapp()
    if(member("ETCH" axlClasses()) != nil then class_chk = "ETCH" else class_chk = "CONDUCTOR");end if
    via_overlay = list()
    layername = nil
    etchparam = axlGetParam("paramLayerGroup:ETCH")
    layername = etchparam->groupMembers
    axlSetFindFilter(?enabled `("NOALL" "VIAS") ?onButtons `("VIAS"))
    foreach(layer_id layername
    if(axlDBGetLayerType(strcat("ETCH/", layer_id)) == "CONDUCTOR" then
    axlVisibleDesign(nil)
    axlVisibleLayer(strcat("VIA CLASS/", layer_id) t)
    axlAddSelectAll()
    objs = axlGetSelSet()
    axlClearSelSet()
    foreach(obj_via objs
    area_via = axlGetSelSet(axlSingleSelectBox(obj_via->bBox))
    axlClearSelSet()
    via_pad = axlDBGetPad(obj_via strcat(class_chk "/" layer_id) "REGULAR")
    via_padstack = via_pad->bBox
    o_radius = abs(car(nth(0 via_padstack)) - car(nth(1 via_padstack)))/2.0

    foreach(a_via area_via
    via_pad = axlDBGetPad(a_via strcat(class_chk "/" layer_id) "REGULAR")
    via_padstack = via_pad->bBox
    a_radius = abs(car(nth(0 via_padstack)) - car(nth(1 via_padstack)))/2.0
    wid = o_radius + a_radius
    gap = axlDistance(obj_via -> xy , a_via -> xy)
    if(gap > 0.001 && gap < wid then
    via_overlay = append(via_overlay list(layer_id, obj_via ->xy))
    printf("%L\n", via_overlay)
    )
    )
    )
    )
    )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • luanvn81
    luanvn81 over 4 years ago

    Hi! 

    You can test this code, but I think this code need more repair.

    procedure(viaovrlapp()
    if(member("ETCH" axlClasses()) != nil then class_chk = "ETCH" else class_chk = "CONDUCTOR");end if
    via_overlay = list()
    layername = nil
    etchparam = axlGetParam("paramLayerGroup:ETCH")
    layername = etchparam->groupMembers
    axlSetFindFilter(?enabled `("NOALL" "VIAS") ?onButtons `("VIAS"))
    foreach(layer_id layername
    if(axlDBGetLayerType(strcat("ETCH/", layer_id)) == "CONDUCTOR" then
    axlVisibleDesign(nil)
    axlVisibleLayer(strcat("VIA CLASS/", layer_id) t)
    axlAddSelectAll()
    objs = axlGetSelSet()
    axlClearSelSet()
    foreach(obj_via objs
    area_via = axlGetSelSet(axlSingleSelectBox(obj_via->bBox))
    axlClearSelSet()
    via_pad = axlDBGetPad(obj_via strcat(class_chk "/" layer_id) "REGULAR")
    via_padstack = via_pad->bBox
    o_radius = abs(car(nth(0 via_padstack)) - car(nth(1 via_padstack)))/2.0

    foreach(a_via area_via
    via_pad = axlDBGetPad(a_via strcat(class_chk "/" layer_id) "REGULAR")
    via_padstack = via_pad->bBox
    a_radius = abs(car(nth(0 via_padstack)) - car(nth(1 via_padstack)))/2.0
    wid = o_radius + a_radius
    gap = axlDistance(obj_via -> xy , a_via -> xy)
    if(gap > 0.001 && gap < wid then
    via_overlay = append(via_overlay list(layer_id, obj_via ->xy))
    printf("%L\n", via_overlay)
    )
    )
    )
    )
    )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • karthikeyan123
    karthikeyan123 over 4 years ago in reply to luanvn81

    thanks a lott

    • 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