• 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. Adding text blocks

Stats

  • Replies 8
  • Subscribers 158
  • Views 16983
  • Members are here 0
More Content

Adding text blocks

archive
archive over 19 years ago

Does anyone know how to add new text blocks in Skill without calling a script? I am running an interactive command so calling a script is not an option.
axlSetParam doesn't allow me to add a text block although I can alter existing text block parameters this way (despite the documentation).


Originally posted in cdnusers.org by Dave Elder
  • Sign in to reply
  • Cancel
Parents
  • archive
    archive over 19 years ago

    Have you ever reread one of your own answers, only to realize you answered the WRONG question?

    I'm such an idiot. My appologies for the previous post.

    textBlocks are C-structs (a.k.a "user defined objects"), are read only by default and in general, there is no public SKILL interface for creating them.

    There is a way around the problems and you can create textBlock objects programatically in SKILL but the way to do it is highly convoluted.

    Dave said, "I am running an interactive command so calling a script is not an option."

    Actually, it is an option. The way this is done is you write a script file, execute the script file in the background in another instance of allegro, and then reload the database in your current instance.

    The script file does the work you want (adding a textblock), saves the database and exits. A second instance of Allegro is launched in -nographic mode along with the script through the (axlRunBatchDBProgram...) function in your first instance, so you never see the second instance. When the second instance is finished, the first instance of Allegro reloads the database and continues execution of your SKILL program.

    The only problem with this approach is that for that short time while the second instance of Allegro runs in the background, you have two licenses checked out.

    The attached code adds a single textBlock to your database. Also, this same method is useful for deleting all those unwanted layers from parts (*.dra) when they've been dumped from a board.

    kind regards,
    jcr


    Originally posted in cdnusers.org by J.C. Roberts
    DT_textblock.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • archive
    archive over 19 years ago

    Have you ever reread one of your own answers, only to realize you answered the WRONG question?

    I'm such an idiot. My appologies for the previous post.

    textBlocks are C-structs (a.k.a "user defined objects"), are read only by default and in general, there is no public SKILL interface for creating them.

    There is a way around the problems and you can create textBlock objects programatically in SKILL but the way to do it is highly convoluted.

    Dave said, "I am running an interactive command so calling a script is not an option."

    Actually, it is an option. The way this is done is you write a script file, execute the script file in the background in another instance of allegro, and then reload the database in your current instance.

    The script file does the work you want (adding a textblock), saves the database and exits. A second instance of Allegro is launched in -nographic mode along with the script through the (axlRunBatchDBProgram...) function in your first instance, so you never see the second instance. When the second instance is finished, the first instance of Allegro reloads the database and continues execution of your SKILL program.

    The only problem with this approach is that for that short time while the second instance of Allegro runs in the background, you have two licenses checked out.

    The attached code adds a single textBlock to your database. Also, this same method is useful for deleting all those unwanted layers from parts (*.dra) when they've been dumped from a board.

    kind regards,
    jcr


    Originally posted in cdnusers.org by J.C. Roberts
    DT_textblock.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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