• 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. Change text height

Stats

  • Replies 2
  • Subscribers 159
  • Views 12675
  • Members are here 0
More Content

Change text height

steve
steve over 16 years ago

Does anyone know if there is any skill code avaliable to change the text block height of specifc groups of components ? What I want to do is only select components with a refdes of R or C and increase or decrease their text block height.

Thanks

  • Sign in to reply
  • Cancel
  • eDave
    eDave over 16 years ago

    Hi Steve,

    The following snippet might help you.

    Cheers, Dave

    defun( replaceRefdesTextHgt (refdesPrefixString, newTextBlock, layer, "ttt")
     let((txtObjs, txtOrient, result, (n 0))
      axlClearSelSet()
      axlSetFindFilter(?enabled list("noall", "invisible", "text"), ?onButtons list("noall", "text"))
      axlAddSelectAll()
      txtObjs = setof(dbid, axlGetSelSet(), dbid ->layer == layer && dbid ->textBlock != newTextBlock && rexMatchp(strcat(refdesPrefixString, "[0-9]+[.]*"), dbid ->text))
      axlClearSelSet()
      foreach(txtId, txtObjs
        txtOrient = make_axlTextOrientation(?textBlock newTextBlock, ?rotation txtId ->rotation, ?mirrored txtId ->isMirrored, ?justify txtId ->justify)
        result = axlDBCreateText(txtId ->text, txtId ->xy, txtOrient, txtId ->layer, txtId ->parent)
        when(result, axlDeleteObject(txtId), n++)
      )
      n
    ))

    Usage example: replaceRefdesTextHgt("C", "18", "REF DES/ASSEMBLY_TOP")

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • oldmouldy
    oldmouldy over 16 years ago

    Hi Dave,

    Another spectacular insight into SKILL, I guess it must be mid-winter for you which is how come you have the time to invent all this stuff!

    Many thanks for all of your contributions!

    • 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