• 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. How to import artwork by Skill

Stats

  • Replies 2
  • Subscribers 160
  • Views 13523
  • Members are here 0
More Content

How to import artwork by Skill

leonlee
leonlee over 11 years ago

How to import artwork by Skill? which like the command "load photoplot" ( File>import>Artwork...)

I'd like to import artworks by mass treatment. Does Skill can do it?

  • Sign in to reply
  • Cancel
Parents
  • Ejlersen
    Ejlersen over 11 years ago

    Hi

    This is possible using scripts.

    Use getDirFiles and search result for artwork files.

    wrap import->artwork scripts into the skill program.

    For the first file import you will need to specify coordinates for placement.

    For the rest you can reuse origin.

    Depending on the requirement, you would have to invent subclasses or at least check for their existance before placement.

    Notice that only artwork files from PCB Editor can be imported. Also when creating the scripts you wan't to mimic, make sure to mimic all settings to take care of all possibilities.

    Skill code example

    defun( ns_drcsize ()

    let((tmp_file)

    tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")

    fprintf(tmp_file "scriptmode +i +n +w +c\n")

    fprintf(tmp_file "prmed\n")

    fprintf(tmp_file "setwindow form.prmedit\n")

    fprintf(tmp_file "FORM prmedit display\n")

    fprintf(tmp_file "FORM prmedit drc_marker_size %f\n" 2.00)

    fprintf(tmp_file "FORM prmedit done\n")

    fprintf(tmp_file "setwindow pcb\n")

    axlDMClose(tmp_file)

    axlShell("replay tmp")

    when(isFile("tmp.scr") deleteFile("tmp.scr"))

    )) 

     

    Best regards

    Ole 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Ejlersen
    Ejlersen over 11 years ago

    Hi

    This is possible using scripts.

    Use getDirFiles and search result for artwork files.

    wrap import->artwork scripts into the skill program.

    For the first file import you will need to specify coordinates for placement.

    For the rest you can reuse origin.

    Depending on the requirement, you would have to invent subclasses or at least check for their existance before placement.

    Notice that only artwork files from PCB Editor can be imported. Also when creating the scripts you wan't to mimic, make sure to mimic all settings to take care of all possibilities.

    Skill code example

    defun( ns_drcsize ()

    let((tmp_file)

    tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")

    fprintf(tmp_file "scriptmode +i +n +w +c\n")

    fprintf(tmp_file "prmed\n")

    fprintf(tmp_file "setwindow form.prmedit\n")

    fprintf(tmp_file "FORM prmedit display\n")

    fprintf(tmp_file "FORM prmedit drc_marker_size %f\n" 2.00)

    fprintf(tmp_file "FORM prmedit done\n")

    fprintf(tmp_file "setwindow pcb\n")

    axlDMClose(tmp_file)

    axlShell("replay tmp")

    when(isFile("tmp.scr") deleteFile("tmp.scr"))

    )) 

     

    Best regards

    Ole 

    • 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