• 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. skill program to create shape symbol

Stats

  • Replies 11
  • Subscribers 164
  • Views 19410
  • Members are here 0
More Content

skill program to create shape symbol

Ejlersen
Ejlersen over 15 years ago

Hi

Attached, find a small utility to help creating rectangular shapes with rounded corners for shape symbols to be used inside a pad

Usage: File, New, Shape symbol

Run the program "ns_spad"

Add width(x), height(y) and a radius in the dialog shown

Hit run to create the shape.

Have fun :-)

Ole

ns_spad.zip
  • Sign in to reply
  • Cancel
Parents
  • SKILLBILL
    SKILLBILL over 15 years ago

    Hi vramanan

     

    This is great. Wonderfull. I made it, thx to your idea vramanan. I have created padstack.

    You are 100% right. With the help of axlDBCreatePadStack function padstack is virtualy created in allegro database.

    Export of the padstack allso works.

     

    Right now I am working on a way to automaticaly export this pad.

    Some time ago mr Ejlersen showed me a way to fill forms that pop up in allegro.

    Back then i was filling form that poped after nctape_full command

    and i used this code

    tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")
          fprintf(tmp_file "scriptmode +i +n +w +c\n")
          fprintf(tmp_file "setwindow pcb\n")
          fprintf(tmp_file "nctape_full\n")
          fprintf(tmp_file "setwindow form.nc_drill\n")
          fprintf(tmp_file "FORM nc_drill tape_name NC_Drill_%s.drl\n" filename)
          fprintf(tmp_file "FORM nc_drill auto_tool_select YES\n")
         fprintf(tmp_file "FORM nc_drill separate_tapes NO\n")
          fprintf(tmp_file "FORM nc_drill repeat_codes YES\n")
          fprintf(tmp_file "FORM nc_drill optimize YES\n")
          fprintf(tmp_file "FORM nc_drill execute\n")
          fprintf(tmp_file "FORM nc_drill close\n")
          fprintf(tmp_file "setwindow pcb\n")
          axlDMClose(tmp_file)
          axlShell("replay tmp")
          if( isFile( "tmp.scr") then deleteFile("tmp.scr"))
          printf("NC Drill created succesfully\n")

     

    now i tried to modify it a little but i dont know the name of the form dlib opens.

    This is what I have tried:

    tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")
             fprintf(tmp_file "scriptmode +i +n +w +c\n")
             fprintf(tmp_file "setwindow pcb\n")
             fprintf(tmp_file "dlib\n")    
             fprintf(tmp_file "setwindow form.export_libraries\n") ; this is where i am wrong forms name aint form.export_libraries
             fprintf(tmp_file "FORM export_libraries mechanical_symbols NO\n") ;checkbox set to NO but i am not sure to the name of those checkboxes. I used the names i found in help under "dlib"
             fprintf(tmp_file "FORM export_libraries package_symbols NO\n")
             fprintf(tmp_file "FORM export_libraries format_symbols NO\n")
             fprintf(tmp_file "FORM export_libraries shape_and_flash_symbols NO\n")
             fprintf(tmp_file "FORM export_libraries device_files NO\n")
             fprintf(tmp_file "FORM export_libraries padstacks YES\n")
             fprintf(tmp_file "FORM export_libraries no_library_dependencies NO\n")
             fprintf(tmp_file "FORM export_libraries execute\n")
             fprintf(tmp_file "FORM export_libraries close\n")
             fprintf(tmp_file "setwindow pcb\n")
             axlDMClose(tmp_file)
             axlShell("replay tmp")
            if( isFile( "tmp.scr") then deleteFile("tmp.scr"))

    it doesnt work...tho..

    If you have a clue of those params pls tell me. I feel i am so close :)

    Damn you are good vramanan :D

    I am realy happy and impressed

    Have a nice day

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • SKILLBILL
    SKILLBILL over 15 years ago

    Hi vramanan

     

    This is great. Wonderfull. I made it, thx to your idea vramanan. I have created padstack.

    You are 100% right. With the help of axlDBCreatePadStack function padstack is virtualy created in allegro database.

    Export of the padstack allso works.

     

    Right now I am working on a way to automaticaly export this pad.

    Some time ago mr Ejlersen showed me a way to fill forms that pop up in allegro.

    Back then i was filling form that poped after nctape_full command

    and i used this code

    tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")
          fprintf(tmp_file "scriptmode +i +n +w +c\n")
          fprintf(tmp_file "setwindow pcb\n")
          fprintf(tmp_file "nctape_full\n")
          fprintf(tmp_file "setwindow form.nc_drill\n")
          fprintf(tmp_file "FORM nc_drill tape_name NC_Drill_%s.drl\n" filename)
          fprintf(tmp_file "FORM nc_drill auto_tool_select YES\n")
         fprintf(tmp_file "FORM nc_drill separate_tapes NO\n")
          fprintf(tmp_file "FORM nc_drill repeat_codes YES\n")
          fprintf(tmp_file "FORM nc_drill optimize YES\n")
          fprintf(tmp_file "FORM nc_drill execute\n")
          fprintf(tmp_file "FORM nc_drill close\n")
          fprintf(tmp_file "setwindow pcb\n")
          axlDMClose(tmp_file)
          axlShell("replay tmp")
          if( isFile( "tmp.scr") then deleteFile("tmp.scr"))
          printf("NC Drill created succesfully\n")

     

    now i tried to modify it a little but i dont know the name of the form dlib opens.

    This is what I have tried:

    tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")
             fprintf(tmp_file "scriptmode +i +n +w +c\n")
             fprintf(tmp_file "setwindow pcb\n")
             fprintf(tmp_file "dlib\n")    
             fprintf(tmp_file "setwindow form.export_libraries\n") ; this is where i am wrong forms name aint form.export_libraries
             fprintf(tmp_file "FORM export_libraries mechanical_symbols NO\n") ;checkbox set to NO but i am not sure to the name of those checkboxes. I used the names i found in help under "dlib"
             fprintf(tmp_file "FORM export_libraries package_symbols NO\n")
             fprintf(tmp_file "FORM export_libraries format_symbols NO\n")
             fprintf(tmp_file "FORM export_libraries shape_and_flash_symbols NO\n")
             fprintf(tmp_file "FORM export_libraries device_files NO\n")
             fprintf(tmp_file "FORM export_libraries padstacks YES\n")
             fprintf(tmp_file "FORM export_libraries no_library_dependencies NO\n")
             fprintf(tmp_file "FORM export_libraries execute\n")
             fprintf(tmp_file "FORM export_libraries close\n")
             fprintf(tmp_file "setwindow pcb\n")
             axlDMClose(tmp_file)
             axlShell("replay tmp")
            if( isFile( "tmp.scr") then deleteFile("tmp.scr"))

    it doesnt work...tho..

    If you have a clue of those params pls tell me. I feel i am so close :)

    Damn you are good vramanan :D

    I am realy happy and impressed

    Have a nice day

    • 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