• 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 Scripting - Skill
  3. Duplicate refdes

Stats

  • Replies 15
  • Subscribers 17
  • Views 14185
  • Members are here 0
More Content

Duplicate refdes

vimaldevlpr
vimaldevlpr over 6 years ago

Hai,

In my .brd file some of (duplicate refdes present in the silk screen)  is there a way to find the duplicate refdes using skill if it possible please share me the skill code.

  • Cancel
  • Sign in to reply
Parents
  • eDave
    eDave over 6 years ago

    These snippets might help you:

    symbols = setof(sym, axlDBGetDesign() ->symbols, sym ->refdes)
    multiRefdesList = setof(refdes, symbols ~>refdes, refdes && !onep(length(setof(ref, symbols ~>refdes, ref == refdes))))

    multiRefdesSymbols = setof(sym, symbols, exists(s, symbols, s != sym && s ->refdes == sym ->refdes))

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • vimaldevlpr
    vimaldevlpr over 6 years ago in reply to eDave

    Thanks for your reply dave actually i am new to skill i tried it but it comes error can you please send me the whole code to run this will helpful to me lott.

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

    That is the whole code. Make sure you enter it one line at a time.

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

    Thank you dave i tried it comes only error i will attach the code can you please re correct it please.

    procedure( Duplicate()
        (let (symbols multiRefdesList multiRefdesSymbols port file msg done  )
        file = "pinnets.log"
        msg = "Duplicate Refdes"
        symbols = setof(sym, axlDBGetDesign() ->symbols, sym ->refdes) multiRefdesList = setof(refdes, symbols ~>refdes, refdes && !onep(length(setof(ref, symbols ~>refdes, ref == refdes)))) multiRefdesSymbols = setof(sym, symbols, exists(s, symbols, s != sym && s ->refdes == sym ->refdes))
           
        port = axlDMOpenLog(file)
        fprintf(port "%s:\n" msg)
        done = 0
        foreach(item symbols
            fprintf(port "\t%s%s\n" item->name)
            ++done
        )
        if(done then
            fprintf(port "\n Duplicate Refdes: %d\n" done)
            axlHighlightObject(symbols)
            
        else
            fprintf(port "\n No duplicates \n")
        )
        axlDMClose(port)
        axlUIViewFileCreate(file msg nil '(30 25) '(CENTER))

    ))

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

    Try this (but I haven't tested it):

    procedure( Duplicate()
    let((symbols multiRefdesSymbols port file msg done )
    file = "pinnets.log"
    msg = "Duplicate Refdes"
    symbols = setof(sym, axlDBGetDesign() ->symbols, sym ->refdes)
    ;multiRefdesList = setof(refdes, symbols ~>refdes, refdes && !onep(length(setof(ref, symbols ~>refdes, ref == refdes))))
    multiRefdesSymbols = setof(sym, symbols, exists(s, symbols, s != sym && s ->refdes == sym ->refdes))

    port = axlDMOpenLog(file)
    fprintf(port "%s:\n" msg)
    done = 0
    foreach(item multiRefdesSymbols
    fprintf(port "\t%s %s\n" item->name, item->refdes)
    ++done
    )
    if(done then
    fprintf(port "\n Duplicate Refdes: %d\n" done)
    axlHighlightObject(multiRefdesSymbols)

    else
    fprintf(port "\n No duplicates \n")
    )
    axlDMClose(port)
    axlUIViewFileCreate(file msg nil '(30 25) '(CENTER))
    ))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • eDave
    eDave over 6 years ago in reply to vimaldevlpr

    Try this (but I haven't tested it):

    procedure( Duplicate()
    let((symbols multiRefdesSymbols port file msg done )
    file = "pinnets.log"
    msg = "Duplicate Refdes"
    symbols = setof(sym, axlDBGetDesign() ->symbols, sym ->refdes)
    ;multiRefdesList = setof(refdes, symbols ~>refdes, refdes && !onep(length(setof(ref, symbols ~>refdes, ref == refdes))))
    multiRefdesSymbols = setof(sym, symbols, exists(s, symbols, s != sym && s ->refdes == sym ->refdes))

    port = axlDMOpenLog(file)
    fprintf(port "%s:\n" msg)
    done = 0
    foreach(item multiRefdesSymbols
    fprintf(port "\t%s %s\n" item->name, item->refdes)
    ++done
    )
    if(done then
    fprintf(port "\n Duplicate Refdes: %d\n" done)
    axlHighlightObject(multiRefdesSymbols)

    else
    fprintf(port "\n No duplicates \n")
    )
    axlDMClose(port)
    axlUIViewFileCreate(file msg nil '(30 25) '(CENTER))
    ))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • vimaldevlpr
    vimaldevlpr over 6 years ago in reply to eDave

    hai dave thanks for your reply it shows 0 duplicates but it  there in my .brd files  can you please check it  please dave.

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

    Ok. I just reviewed your original post that is about silkscreen- not symbols.

    You will need to check the text on the silkscreen layers to check for duplicates.

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

    Yes dave i want to check in silk screen duplicate refdes can you please recorrect the code

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

    You need to use the find filter to obtain the text dbids and then process them to find the duplicates

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

    hai dave can you please share me the code i tried it its not working i am new to skill so can you share me the code please

    • 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