• 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. Utility to output a single symbol from a design

Stats

  • Replies 4
  • Subscribers 159
  • Views 13489
  • Members are here 0
More Content

Utility to output a single symbol from a design

joma
joma over 8 years ago

jm_write_1_symbol_public.zip

Hi, I recently discovered the skill command "axlWritePackageFile( car(axlSelectByName("SYMTYPE" symbol-name))->definition )" which writes a single footprint
from a pcb. The good thing about it is it writes the symbol .dra and.psm files with all associated padstack files. I find this very handy from time to time. The bad thing

is it is a pain to be typing skill commands like this so I have created a user interface form to make things easier. As I have benefited from lots of utilities found in this
forum I thought I would contribute something of my own (however simple).

To load the code type "skill load("jm_write_1_symbol_public.il"). The file shoud be in your skill path.
To run the code type "write one symbol" on the command line.

All feedback welcome.

Load the Skill code using"skill load("RotateSilkAssyRD.il)" - See more at: community.cadence.com/.../17911
Load the Skill code using"skill load("RotateSilkAssyRD.il)" - See more at: community.cadence.com/.../17911
  • Sign in to reply
  • Cancel
Parents
  • B Bruekers
    B Bruekers over 8 years ago
    A simple example for a string form:

    p = nil
    sprintf(p "FILE_TYPE=FORM_DEFN VERSION=2\tFORM\tFIXED\tPORT 50 10\tHEADER \"TITLE_OF_FORM\"\tTILE")
    sprintf(p "%s\tTEXT \"HELLO\" \tTLOC 2 1\t\tENDTEXT" p)
    sprintf(p "%s\tENDTILE\tENDFORM" p)
    defvar(fw_test nil)
    axlFormCreate( 'fw_test list("test_form" list(p)) '("CENTER" ) 'fw_callback t)
    axlFormDisplay(fw_test)

    basically you need to make 1 long string that contains the form. New lines need to be \t (tab), not \n or \r.
    Then you need to call axlFormCreate with this : list("test_form" list(p)) the "test_form" can be any string you like.
    The rest of the form function, creation, handling etc is equal to the file-based form.

    To return multiple variables you can or return a list like list( result_a result_b) and then use car() and cadr() to extract the results returned from the function
    Another way is to use a global.
    First you need to generate a global with defvar() and then at the end use var_name = 'unbind. The last statement unbinds/removes the global variable.
    Don't put this global variable into the let(), otherwise it won't work.

    A hint, you can use the form variable to store return values like;
    axlFormCreate( 'fw_test ....
    fw_test->test = "hello"

    and then you can recall the value by simply using 'fw_test->test'.
    Since in the above example the fw_test is a global, you can access it anywhere in your functions.

    Bram
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • B Bruekers
    B Bruekers over 8 years ago
    A simple example for a string form:

    p = nil
    sprintf(p "FILE_TYPE=FORM_DEFN VERSION=2\tFORM\tFIXED\tPORT 50 10\tHEADER \"TITLE_OF_FORM\"\tTILE")
    sprintf(p "%s\tTEXT \"HELLO\" \tTLOC 2 1\t\tENDTEXT" p)
    sprintf(p "%s\tENDTILE\tENDFORM" p)
    defvar(fw_test nil)
    axlFormCreate( 'fw_test list("test_form" list(p)) '("CENTER" ) 'fw_callback t)
    axlFormDisplay(fw_test)

    basically you need to make 1 long string that contains the form. New lines need to be \t (tab), not \n or \r.
    Then you need to call axlFormCreate with this : list("test_form" list(p)) the "test_form" can be any string you like.
    The rest of the form function, creation, handling etc is equal to the file-based form.

    To return multiple variables you can or return a list like list( result_a result_b) and then use car() and cadr() to extract the results returned from the function
    Another way is to use a global.
    First you need to generate a global with defvar() and then at the end use var_name = 'unbind. The last statement unbinds/removes the global variable.
    Don't put this global variable into the let(), otherwise it won't work.

    A hint, you can use the form variable to store return values like;
    axlFormCreate( 'fw_test ....
    fw_test->test = "hello"

    and then you can recall the value by simply using 'fw_test->test'.
    Since in the above example the fw_test is a global, you can access it anywhere in your functions.

    Bram
    • 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