• 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. Decompose shape using skill

Stats

  • Replies 2
  • Subscribers 18
  • Views 10494
  • Members are here 0
More Content

Decompose shape using skill

ENEGUE
ENEGUE over 6 years ago

Hi Guys,

I try to using skill to decompose shape but it only able to decompose one shape, second shape it will show error msg..=(

Error msg: 

dbid:removed
W- *WARNING* (axlPolyFromDB): Invalid database id argument - dbid:removed
E- *Error* fprintf/sprintf: format spec. incompatible with data - "Format is 'decompose shape;setwindow pcb;pick %f %f;setwindow pcb;prepopup;Done', argument #1 is nil"

;==========================================================================================================

axlCmdRegister( "seg" `milling ?cmdType "General")

procedure( milling()
;==========================================================================================================

;open ncroute layer only and get shapes
axlShell("QtSignal ColorVisibilityPane CVPGlobalVisOff clicked")
axlVisibleLayer("BOARD GEOMETRY/NCROUTE_PATH" t)
shapes = _EXfindAllOfType("SHAPES")

foreach( shape shapes

;Convert shape to poly and random get vertices from poly
shape_poly = car( axlPolyFromDB(shape))
shape_vertices = caar(shape_poly-> vertices)
shape_x = car(shape_vertices)
shape_y = car(cdr(shape_vertices))

axlShell(sprintf(nil "decompose shape;setwindow pcb;pick %f %f;setwindow pcb;prepopup;Done" shape_x shape_y))
)
;==========================================================================================================
)

Any idea?

Eugene

  • Cancel
  • Sign in to reply
Parents
  • B Bruekers
    B Bruekers over 6 years ago

    The 'dbid:removed' is caused by the axlShell(), after the first axlShell() all dbid's in 'shapes' are removed. 

    You want to create lines of out shapes right? Try something like this:

    axlVisibleDesign(nil)
    axlVisibleLayer("BOARD GEOMETRY/NCROUTE_PATH" t)
    shapes = _EXfindAllOfType("SHAPES")
    foreach( shape shapes
      ;Convert shape to path
      path = axlDB2Path(shape)
      axlDBCreatePath(path "BOARD GEOMETRY/NCROUTE_PATH" 'line nil nil)
    )

    By converting the shape into a rpath you can create a line from it. 

    Bram

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • B Bruekers
    B Bruekers over 6 years ago

    The 'dbid:removed' is caused by the axlShell(), after the first axlShell() all dbid's in 'shapes' are removed. 

    You want to create lines of out shapes right? Try something like this:

    axlVisibleDesign(nil)
    axlVisibleLayer("BOARD GEOMETRY/NCROUTE_PATH" t)
    shapes = _EXfindAllOfType("SHAPES")
    foreach( shape shapes
      ;Convert shape to path
      path = axlDB2Path(shape)
      axlDBCreatePath(path "BOARD GEOMETRY/NCROUTE_PATH" 'line nil nil)
    )

    By converting the shape into a rpath you can create a line from it. 

    Bram

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • ENEGUE
    ENEGUE over 6 years ago in reply to B Bruekers

    Thanks Bram, i got it...thanks=)

    Eugene

    • 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