• 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. How do I copy line from component assembly_top layer to...

Stats

  • State Verified Answer
  • Replies 4
  • Subscribers 159
  • Views 6866
  • Members are here 0
More Content

How do I copy line from component assembly_top layer to another layer?

ryamashita
ryamashita over 2 years ago

I am writing some Skill code to copy the RefDes and lines from all of the symbols in a .brd file to another layer.  The code works to copy the RefDes but it doesn't work to copy the lines.  I am able to convert the lines to a polygon but that isn't what I want, I want to keep the lines as lines.  Below is the code that I wrote.  Note I have comments around the code that doesn't work and also the alternate code that seems to work but isn't what I want.  Can anyone help me to figure out what commands I need to copy the lines to another layer?  

(defun temp ()
; disable the Fixed property testing
axlDBIgnoreFixed(t)

; Get list of all components in design
symList=axlDBGetDesign()->symbols

; Go through all the symbols in symList
foreach(cursymbol symList
symchildren=cursymbol->children
; Get a list of all of the children properties of the symbol
symchildren=cursymbol->children
foreach(curChild symchildren
when(curChild->objType=="text" && curChild->layer=="REF DES/ASSEMBLY_TOP"
; Create a copy of the text
copiedtext=axlCopyObject(curChild ?angle 0)
; Move copied text to the "MANUFACTURING/DNI Components Top" layer
axlChangeLayer(copiedtext "MANUFACTURING/DNI Components Top")
)
when(curChild->objType=="path" && curChild->layer=="PACKAGE GEOMETRY/ASSEMBLY_TOP"
; ******** Code that doesn't work **********
; Create a copy of the text
copiedline=axlCopyObject(curChild ?angle 0)
; Move copied line to the "MANUFACTURING/DNI Components Top" layer
axlChangeLayer(copiedline "MANUFACTURING/DNI Components Top")
; ******** Code that doesn't work **********

; ******** Alternate code - Works but not what I want **********
; Create r_path
tempPath=axlDB2Path(curChild)
; Create polygon from r_path
tempPoly=car(axlPolyFromDB(tempPath))
; Create shape from the polygon
axlDBCreateShape(tempPoly, t, "MANUFACTURING/DNI Components Top")
; ******** End Alternate code - Works but not what I want **********
)
)
)
; Reenable the Fixed property testing
axlDBIgnoreFixed(nil)
)

  • Sign in to reply
  • Cancel
Parents
  • DavidJHutchins
    +1 DavidJHutchins over 2 years ago

    replace the following:

    axlDBCreateShape(tempPoly, t, "MANUFACTURING/DNI Components Top")

    with:

    axlDBCreatePath(tempPath "MANUFACTURING/DNI Components Top" )

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • DavidJHutchins
    +1 DavidJHutchins over 2 years ago

    replace the following:

    axlDBCreateShape(tempPoly, t, "MANUFACTURING/DNI Components Top")

    with:

    axlDBCreatePath(tempPath "MANUFACTURING/DNI Components Top" )

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject 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