• 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. Cline to other Cline segment Airgap

Stats

  • Replies 6
  • Subscribers 160
  • Views 16126
  • Members are here 0
More Content

Cline to other Cline segment Airgap

vimaldevlpr
vimaldevlpr over 5 years ago

Hi,

I need one help can any one please help me out from this.

The selected Cline alone has to check the air gap of every cline segment present in the board in that the input value will get by run time. if the airgap value is lesser than input value the cline segment want to be highlight. I'll tried but I shows error can anyone please re correct it.

E- *Error* greaterp: can't handle (4 > nil)

procedure(checkcseg()
axlClearSelSet()
axlSetFindFilter(?enabled `("NOALL" "CLINES") ?onButtons `("CLINES"))
clineschk = axlGetSelSet(axlSelect(?prompt "Select Clines by pick or window."))
if(clineschk then
axlClearSelSet()
axlSetFindFilter(?enabled `("NOALL" "CLINESEGS") ?onButtons `("CLINESEGS"))
clinesegchk = axlGetSelSet(axlAddSelectAll())
val = atoi(axlUIPrompt("Enter the Max Airgap value :"))
if(clinesegchk then
foreach(cln_db clineschk
foreach(csg clinesegchk
_AirGap = lastelem(axlAirGap(cln_db csg csg->layer) )
if(val > _AirGap  then
axlHighlightObject(csg)
print(csg ->xy)
printf("found")
)
)
)
)
)

  • Sign in to reply
  • Cancel
Parents
  • DavidJHutchins
    DavidJHutchins over 5 years ago

    Try the modified code shown below, also I don't think you can hightlight cline segments, only it's net...

    procedure(clineAirgap()
    let((a in1 cseg1 cseg2 cseg3 cseg4 val data _AirGap loc1 loc2)
    (a = list())
    (in1 = infile("Netlist.lst"))
    while(gets(cseg1 in1)
    cseg1 = car(parseString(cseg1 "\n"))
    when(cseg1
    push(cseg1 a)
    )
    )
    close(in1)
    (cseg2 = car(axlSelectByName("NET", car(a))))
    if(cseg2 then
    axlClearSelSet()
    axlSetFindFilter(?enabled '("NOALL" "CLINESEGS") ?onButtons '("CLINESEGS"))
    cseg3 = axlGetSelSet(axlAddSelectAll())
    val = atof(axlUIPrompt("Enter the minimum airgap :"))
    if(cseg3 then
    foreach(cseg2b cseg2->branches
    foreach(chk cseg2b->children
    when(chk->objType == "path"
    (cseg4 = setof(seg cseg3 ((seg->layer) == chk->layer)))
    foreach(cseg5 cseg4
    if(neq(cseg5->net cseg2) then
    (data = (axlAirGap chk cseg5 (cseg5->layer)))
    when(data
    (_AirGap = (lastelem data))
    when(val > _AirGap axlShowObject(cseg5))
    when(_AirGap < val
    (loc1 = car(data))
    (loc2 = cadr(data))
    axlMsgPut("AirGap Spacing error := layer %s; loc1 = %.4f:%.4f ; loc2 = %.4f:%.4f ; airgap %f" cseg5->layer car(loc1) cadr(loc1) car(loc2) cadr(loc2) _AirGap)
    axlHighlightObject(chk->net)
    axlHighlightObject(cseg5->net)
    )
    )
    )
    )
    )
    )
    )
    else
    axlMsgPut("Nothing selected")
    )
    )
    )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • DavidJHutchins
    DavidJHutchins over 5 years ago

    Try the modified code shown below, also I don't think you can hightlight cline segments, only it's net...

    procedure(clineAirgap()
    let((a in1 cseg1 cseg2 cseg3 cseg4 val data _AirGap loc1 loc2)
    (a = list())
    (in1 = infile("Netlist.lst"))
    while(gets(cseg1 in1)
    cseg1 = car(parseString(cseg1 "\n"))
    when(cseg1
    push(cseg1 a)
    )
    )
    close(in1)
    (cseg2 = car(axlSelectByName("NET", car(a))))
    if(cseg2 then
    axlClearSelSet()
    axlSetFindFilter(?enabled '("NOALL" "CLINESEGS") ?onButtons '("CLINESEGS"))
    cseg3 = axlGetSelSet(axlAddSelectAll())
    val = atof(axlUIPrompt("Enter the minimum airgap :"))
    if(cseg3 then
    foreach(cseg2b cseg2->branches
    foreach(chk cseg2b->children
    when(chk->objType == "path"
    (cseg4 = setof(seg cseg3 ((seg->layer) == chk->layer)))
    foreach(cseg5 cseg4
    if(neq(cseg5->net cseg2) then
    (data = (axlAirGap chk cseg5 (cseg5->layer)))
    when(data
    (_AirGap = (lastelem data))
    when(val > _AirGap axlShowObject(cseg5))
    when(_AirGap < val
    (loc1 = car(data))
    (loc2 = cadr(data))
    axlMsgPut("AirGap Spacing error := layer %s; loc1 = %.4f:%.4f ; loc2 = %.4f:%.4f ; airgap %f" cseg5->layer car(loc1) cadr(loc1) car(loc2) cadr(loc2) _AirGap)
    axlHighlightObject(chk->net)
    axlHighlightObject(cseg5->net)
    )
    )
    )
    )
    )
    )
    )
    else
    axlMsgPut("Nothing selected")
    )
    )
    )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • vimaldevlpr
    vimaldevlpr over 5 years ago in reply to DavidJHutchins

    Kindly Thanks for your support and Valuable time for me Thanks.

    • 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