• 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. Getting Static Shape DBID Alone

Stats

  • State Not Answered
  • Replies 1
  • Subscribers 18
  • Views 3874
  • Members are here 0
More Content

Getting Static Shape DBID Alone

karthikeyank
karthikeyank over 3 years ago

Hi,

I would like to to get Static shape DBID but i dont know how to get Static shape DBID alone can any plz guide me to get.

procedure(sovchk()
axlClearSelSet()
axlSetFindFilter(?enabled `("NOALL" "SHAPES") ?onButtons `("SHAPES"))
ShpDt = axlGetSelSet(axlSelect( ))

;Static shape DBID alone
print(ShpDt )
)

  • Cancel
  • Sign in to reply
Parents
  • VVRD
    0 VVRD over 3 years ago
    1. Copy the below code  which is after step 3 to a file and attach it to your pcbenv folder.
    2. Add the line

     

    load("staticShapeReport2.il")

    to the "allegro.ilinit" file in this directory (create this file with just this one line if needed).

    Running the report

    3. Run the command "sshape_report" on the allegro command line

    Code:

    axlCmdRegister("sshape_report" 'AeStaticShapeReport ?cmdType "interactive" )

    procedure( AeStaticShapeReport(@optional (rptName "StaticShapeReport"))
    let( (fp saveVis i class subclass net_name layerInfo)
    fp = axlDMOpenFile("ALLEGRO_REPORT" rptName "w")
    axlLogHeader(fp "Report on Static Shapes in Design")

    saveVis = axlVisibleGet()

    EtchOnlyVisible()

    /*

    axlVisibleDesign(nil)
    axlVisibleLayer("ETCH" t)
    axlVisibleUpdate(t)

    */

    axlSetFindFilter(?enabled list("noall" "shapes") ?onButtons list("noall" "shapes"))
    axlClearSelSet()
    axlAddSelectAll()

    fprintf(fp, " Static Shape Report \n")

    shape_list = axlGetSelSet()

    i = 0

    foreach(shape shape_list

    i++

    unless(shape->shapeBoundary

    fprintf(fp, "|---------------------------------------------------------------------------|\n ")
    fprintf(fp, "\n")
    fprintf(fp, " Shape No.%d " i)
    fprintf(fp, "\n")
    fprintf(fp, " Shape Settings\n")
    fprintf(fp, " --------------\n")

    if(shape->net->name then

    if(equal(net_name "") then
    net_name = shape->net->name
    else
    net_name = "dummy net"
    )

    else
    net_name = "dummy net"

    )
    fprintf(fp, " Net name %s \n" net_name )


    if(shape->layer then
    layerInfo = parseString(shape->layer "/")
    class = car(layerInfo)
    subclass = cadr(layerInfo)

    fprintf(fp, " Class %s \n" class )
    fprintf(fp, " Subclass %s \n" subclass )

    )
    fprintf(fp, " Extents: %L \n" shape->bBox )
    fprintf(fp, " Area: %n \n" car(axlPolyFromDB(shape))->area)
    fprintf(fp, " Number of Voids: %d \n" length(shape->voids))

    fprintf(fp, "\n")


    )

    )
    axlVisibleSet(saveVis)

    axlDMClose(fp)

    axlUIViewFileCreate("StaticShapeReport.rpt" "Static Shape report" t)
    t
    ))

    axlCmdRegister("etchonly" 'EtchOnlyVisible ?cmdType "interactive" )


    procedure(EtchOnlyVisible()
    let( ()

    axlVisibleDesign(nil)
    axlVisibleLayer("ETCH" t)
    axlVisibleUpdate(t)
    )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • VVRD
    0 VVRD over 3 years ago
    1. Copy the below code  which is after step 3 to a file and attach it to your pcbenv folder.
    2. Add the line

     

    load("staticShapeReport2.il")

    to the "allegro.ilinit" file in this directory (create this file with just this one line if needed).

    Running the report

    3. Run the command "sshape_report" on the allegro command line

    Code:

    axlCmdRegister("sshape_report" 'AeStaticShapeReport ?cmdType "interactive" )

    procedure( AeStaticShapeReport(@optional (rptName "StaticShapeReport"))
    let( (fp saveVis i class subclass net_name layerInfo)
    fp = axlDMOpenFile("ALLEGRO_REPORT" rptName "w")
    axlLogHeader(fp "Report on Static Shapes in Design")

    saveVis = axlVisibleGet()

    EtchOnlyVisible()

    /*

    axlVisibleDesign(nil)
    axlVisibleLayer("ETCH" t)
    axlVisibleUpdate(t)

    */

    axlSetFindFilter(?enabled list("noall" "shapes") ?onButtons list("noall" "shapes"))
    axlClearSelSet()
    axlAddSelectAll()

    fprintf(fp, " Static Shape Report \n")

    shape_list = axlGetSelSet()

    i = 0

    foreach(shape shape_list

    i++

    unless(shape->shapeBoundary

    fprintf(fp, "|---------------------------------------------------------------------------|\n ")
    fprintf(fp, "\n")
    fprintf(fp, " Shape No.%d " i)
    fprintf(fp, "\n")
    fprintf(fp, " Shape Settings\n")
    fprintf(fp, " --------------\n")

    if(shape->net->name then

    if(equal(net_name "") then
    net_name = shape->net->name
    else
    net_name = "dummy net"
    )

    else
    net_name = "dummy net"

    )
    fprintf(fp, " Net name %s \n" net_name )


    if(shape->layer then
    layerInfo = parseString(shape->layer "/")
    class = car(layerInfo)
    subclass = cadr(layerInfo)

    fprintf(fp, " Class %s \n" class )
    fprintf(fp, " Subclass %s \n" subclass )

    )
    fprintf(fp, " Extents: %L \n" shape->bBox )
    fprintf(fp, " Area: %n \n" car(axlPolyFromDB(shape))->area)
    fprintf(fp, " Number of Voids: %d \n" length(shape->voids))

    fprintf(fp, "\n")


    )

    )
    axlVisibleSet(saveVis)

    axlDMClose(fp)

    axlUIViewFileCreate("StaticShapeReport.rpt" "Static Shape report" t)
    t
    ))

    axlCmdRegister("etchonly" 'EtchOnlyVisible ?cmdType "interactive" )


    procedure(EtchOnlyVisible()
    let( ()

    axlVisibleDesign(nil)
    axlVisibleLayer("ETCH" t)
    axlVisibleUpdate(t)
    )
    )

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