• 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

    Programatically adding text blocks looks simple but actually is a slightly convoluted process. You only need one function but you need five arguments for it.

    (axlDBCreateText
        YourTextData                ;The text you want to write
        XY_Location                  ;Where you want to write the text
        OrientationStructure      ;Formatting for the text block
        LayerToWriteON           ;The layer where the block is written
       nil)                                  ;Attach the text to an object

    The slightly convoluted part is the OrientationStructure. You have to know about the super secret (make_axlTextOrientation...) function for the required structure.

    (setq OrientationStructure
        (make_axlTextOrientation
           ?textBlock "3"               ;see your text block definitions
           ?rotation 0                    ;degrees of rotation
           ?mirrored nil                 ;mirror left-right (i.e. for bottom layer)
           ?justify "LEFT"))           ;text justification

    You can get real fancy with this sort of thing. For example, I've got code for working with symbols, namely making them presentable (PDF) for client approval. It writes the part name, the IPC footprint  name, the number of padstacks used, the number of pins on the device, copyright statement and occasionally dirty jokes into the part drawings (*.dra).

    The symbol validition programs will (eventually) be added to the DesignTools project as soon as I find the time.


    Kind Regards,
    JCR


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

    Programatically adding text blocks looks simple but actually is a slightly convoluted process. You only need one function but you need five arguments for it.

    (axlDBCreateText
        YourTextData                ;The text you want to write
        XY_Location                  ;Where you want to write the text
        OrientationStructure      ;Formatting for the text block
        LayerToWriteON           ;The layer where the block is written
       nil)                                  ;Attach the text to an object

    The slightly convoluted part is the OrientationStructure. You have to know about the super secret (make_axlTextOrientation...) function for the required structure.

    (setq OrientationStructure
        (make_axlTextOrientation
           ?textBlock "3"               ;see your text block definitions
           ?rotation 0                    ;degrees of rotation
           ?mirrored nil                 ;mirror left-right (i.e. for bottom layer)
           ?justify "LEFT"))           ;text justification

    You can get real fancy with this sort of thing. For example, I've got code for working with symbols, namely making them presentable (PDF) for client approval. It writes the part name, the IPC footprint  name, the number of padstacks used, the number of pins on the device, copyright statement and occasionally dirty jokes into the part drawings (*.dra).

    The symbol validition programs will (eventually) be added to the DesignTools project as soon as I find the time.


    Kind Regards,
    JCR


    Originally posted in cdnusers.org by J.C. Roberts
    • 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