• 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. axlClearObjectCustomColor only clears nets

Stats

  • Replies 0
  • Subscribers 17
  • Views 8487
  • Members are here 0
More Content

axlClearObjectCustomColor only clears nets

RasmusDK
RasmusDK over 7 years ago

Hi Community,

I am currently developing a SKILL script, which will be manipulating the custom colors of nets, pins, vias, clines, shapes and rats, as per the Color Dialog (color192). As part of the program, I want to clear the custom colors everywhere. I have tried using axlClearObjectCustomColor, as seen in the code below. Unfortunately, this code only clears the custom colors of nets. Pins, vias, clines, shapes and rats maintain their custom colors, even after I have called the method on them. From the documentation, the method axlClearObjectCustomColor, takes a list of dbids and returns t/nil, depending on if a color was cleared or not. Why does this not work for anything but nets? Am I dealing with the wrong dbids? I can use the same dbids to get the custom color value...

procedure( clearCustomColors()
nlist = axlDBGetDesign()->nets ;nid = car(axlSelectByName("NET" "1V8"))
axlClearObjectCustomColor(nlist)
foreach(nid nlist
axlClearObjectCustomColor(nid->branches)
axlClearObjectCustomColor(nid->ratsnest)
)
; Alternative version:
; foreach(nid nlist
; axlClearObjectCustomColor(nid)
; foreach(bid nid->branches
; foreach(cid bid->children
; case(lowerCase(cid->objType)
; ("path"
; isEtch == t means it is a cline
; if(cid->isEtch
; then
; axlClearObjectCustomColor(cid)
; else
; axlMsgPut("Path was not a cline")
; )
; )
; ("pin"
; axlClearObjectCustomColor(cid)
; )
; ("via"
; axlClearObjectCustomColor(cid)
; )
; ("tee"
; ???
; axlMsgPut("Tee Type")
; axlMsgPut("Tee Type: %L\n" cid->name)
; )
; ("shape"
; axlClearObjectCustomColor(cid)
; )
; (t
; axlMsgPut("Another type: %L\n" cid->objType)
; )
; )
; )
; )
; foreach(rid nid->ratsnest
; axlClearObjectCustomColor(rid)
; )

; )
)

  • Cancel
  • Sign in to reply
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