• 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. use axlDBChangeText

Stats

  • Replies 7
  • Subscribers 18
  • Views 11766
  • Members are here 0
More Content

use axlDBChangeText

did31
did31 over 5 years ago

Hi, I would like to change a text with "axlDBChangeText" but being a novice I must miss something in my code.

Example: 

let((b, textBlocks, text)
axlClearSelSet()
axlVisibleDesign(nil)
axlVisibleLayer("REF DES/ASSEMBLY_TOP" t)
axlSelectByName("SYMTYPE" "1206", "REF DES/ASSEMBLY_TOP") ; search and select a refdes 1206
axlAddSelectAll()
b = axlGetSelSet() ; for a o_dbid
axlDBChangeText( car(b) 'refdes nil 1); *WARNING* (axlDBChangeText): Require a text dbid, dbid:00000208B4AD8240

could someone help me out ?

sorry for my english thank you

  • Sign in to reply
  • Cancel
  • DavidJHutchins
    DavidJHutchins over 5 years ago

    Try adding the following line after the axlVisibleLayer() entry:

    (axlSetFindFilter ?enabled (list "noall" "text") ?onButtons (list "text"))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • did31
    did31 over 5 years ago in reply to DavidJHutchins

    Thank you David but your function select all text and my code for select only refdes of 1206 it's ok.

    With your function, i have a same message.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • did31
    did31 over 5 years ago in reply to did31

    hi David, effectively "axlSendFindFilter" it's ok.

    My new code : 

    let((refselect, refdes, text)
    axlClearSelSet()
    axlVisibleDesign(nil)
    axlVisibleLayer("REF DES/ASSEMBLY_TOP" t)
    axlSetFindFilter(?enabled (list "noall" "text") ?onButtons (list "text"))
    axlAddSelectAll()
    refselect = axlGetSelSet()
    refdes = car(refselect)
    foreach( refdes axlGetSelSet()
    text = refdes->text
    axlDBChangeText( refdes nil 1)
    )
    ));end

    It's ok but all text it's changed. How to change only text with footprint 1206 ? An idea ?

    Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DavidJHutchins
    DavidJHutchins over 5 years ago in reply to did31

    Try adding the following after the foreach( line:

    when(refdes->parent->name ==  "1206")

    and another ) before the "));" end line

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • did31
    did31 over 5 years ago in reply to DavidJHutchins

    Yes, it's perfect.

    Do you know if we can do an equal of style "1206*" ? Because my footprint 1206 have many termination.

    In any case thank you for these answers it helps me a lot.

    Thank's David

    • 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