• 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. axlDBTextBlockCompact(nil)

Stats

  • Replies 2
  • Subscribers 17
  • Views 1684
  • Members are here 0
More Content

axlDBTextBlockCompact(nil)

stmueller
stmueller over 5 years ago

I am trying to understand why axlDBTextBlockCompact(nil) on my test case says it can compact the text blocks down to 38, whereas I find only a total of 26 unique text block references in axlDBGetDesign()->text, axlDBGetDesign()->symbols and axlDBGetDesign()->symdefs. Where else are text blocks used besides these three?

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

    In case this helps, here is the code I used for this comparison:

    procedure( test()
    let( (used allused)

    used = list()
    foreach(tx axlDBGetDesign()->text ; axlDBGetAttachedText(axlDBGetDesign())
    unless( member(tx->textBlock used)
    used = cons(tx->textBlock used)
    ); unless
    unless( member(tx->textBlock allused)
    allused = cons(tx->textBlock allused)
    ); unless
    ); foreach

    printf("Texts use %d:\n" length(used))
    foreach(tx sort(used nil)
    printf(" %s" tx)
    )
    printf("\n")

    used = list()
    foreach(s axlDBGetDesign()->symbols
    foreach(c s->children
    when( c->objType == "text"
    tx = c
    unless( member(tx->textBlock used)
    used = cons(tx->textBlock used)
    ); unless
    unless( member(tx->textBlock allused)
    allused = cons(tx->textBlock allused)
    ); unless
    ); when
    ); foreach
    ); foreach

    printf("Symbols use %d:\n" length(used))
    foreach(tx sort(used nil)
    printf(" %s" tx)
    )
    printf("\n")

    used = list()
    foreach(s axlDBGetDesign()->symdefs
    foreach(c s->children
    when( c->objType == "text"
    tx = c
    unless( member(tx->textBlock used)
    used = cons(tx->textBlock used)
    unless( member(tx->textBlock allused)
    allused = cons(tx->textBlock allused)
    ); unless
    ); unless
    ); when
    ); foreach
    ); foreach
    printf("Symdefs use %d:\n" length(used))
    foreach(tx sort(used nil)
    printf(" %s" tx)
    )
    printf("\n")

    printf("All use %d:\n" length(allused))
    foreach(tx sort(allused nil)
    printf(" %s" tx)
    )
    printf("\n")

    printf("However: axlDBTextBlockCompact says: %d\n" axlDBTextBlockCompact(nil) )

    nil
    ))

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

    Nevermind. I realized in the meantime that I misunderstood what axlDBTextBlockCompact(nil) does and that the last printf should instead say:

        printf("However: axlDBTextBlockCompact says: %d\n" axlDBGetTextBlockCount()-axlDBTextBlockCompact(nil) )

    • 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