• 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. Changing the artwork output dir

Stats

  • Replies 7
  • Subscribers 161
  • Views 16650
  • Members are here 0
More Content

Changing the artwork output dir

Adamsen
Adamsen over 13 years ago

I want to write artworks to a design dependent output directory.

I have a script to create artworks,  

olddir = "output"
outdir = "output/123456-ND-A"
axlSetVariable("ads_sdart" outdir)  ; set working directory to output directory
 sprintf(script
 "scriptmode +i +n +w +c\n
 setwindow pcb\n
 artwork\n
 setwindow form.film_control\n
 FORM film_control select_all\n

 FORM film_control database_check YES\n
 FORM film_control create\n
 setwindow form.film_control\n
 FORM film_control ok\n
 setwindow pcb\n ")  ;end sprintf
 
 COD_replay_script(script)

 axlSetVariable("ads_sdart" olddir)  ;  

If I set "ads_sdart" using setup user preferences, it works fine. If I use this script, the artworks is generated in "output" and art_param.txt is generated in "output/123456-ND-A". That does not make any sense to me. Any surgestions?

Alternatively I could move the files afterwards, but that requires much more unessesary coding.

  • Sign in to reply
  • Cancel
  • Pawandeep
    Pawandeep over 13 years ago
    Hi Adam,

    I am assuming that there exists a directory named “output\123456-ND-A” where your brd file is saved and you want to save all the files to “123456-ND-A”

    I don’t know how are u calling the COD_replay_script(script) function in your code and you haven’t provided your complete code.

    Try running the below SKILL code. It should save all the files in the “output\123456-ND-A” directory.

     
    defun( pawan ()

    olddir = "output"

    outdir = "output/123456-ND-A"

    axlSetVariable("ads_sdart" outdir)

    axlShell("setwindow pcb")

    axlShell("trapsize 3215")

    axlShell("generaledit")

    axlShell("artwork")

    axlShell("setwindow form.film_control")

    axlShell("FORM film_control select_all")

    axlShell("FORM film_control create")

    axlShell("setwindow form.film_control")

    axlShell("FORM film_control ok")

    axlShell("setwindow pcb")

    axlShell("generaledit")

    axlSetVariable("ads_sdart" olddir)  ;

    )

     

    Pawan
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Adamsen
    Adamsen over 13 years ago

    Hello Pawan

    Thanks, for your input. The assumptions you made are correct. The dir structure looks like this, and they exists, at the time I run the script.
    123456.brd/output/123456-ND-A

    I tried running your script. But the result are the same for me.
    123456.brd
    /output/*.art
    /output/123456-ND-A/art_param.txt
    The artwork files are still in the output dir (which "ads_sdart" is set to in site.env), only the art_param.txt is in the output/123456-ND-A dir.

    COD_replay_script makes a scriptfile and replays it.
    procedure( COD_replay_script(cmds)
    let((script_file)
     script_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")
     fprintf(script_file "scriptmode +i +n +w +c\n")
     fprintf(script_file cmds)
     fprintf(script_file "\n")
     axlDMClose(script_file)
     
     if( isFile( "tmp.scr")
     then
      axlShell("replay tmp")
      deleteFile("tmp.scr")
     else
      printf("tmp.scr not found\n")
     ) ;end if
      
    ) ;end let
    ) ; end procedure 

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Pawandeep
    Pawandeep over 13 years ago
    Hello Adam,

    I got the desired results as you wanted it to be. Please refer to my code along with the dummy files that I generated in the attachment. I have used my code instead of yours. I am not sure where the problem exists.

    All files(*.art and art_param.txt) are generated in C:\pawan\output\123456-ND-A

    My board file resides in C:\pawan\test.brd

    In case you still see problems, please try to manually do the changes to “ads_sdart” env and see if you are able to do so and generate the artwork files in the any other path you define here.

    Pawan
    output.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Adamsen
    Adamsen over 13 years ago

    Hello Pawan.

    I tried to exactly as you described. Made a new board, put you script with the board, created output and output/123456-ND-A.

    Running your script I get same result as before. *.art in output and art_param.txt in output/123456-ND-A. When i set ”ads_sdart” manually it works as desired.

    Thank you for testing this. I will now open this as a support case, and take it from there.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • wilef
    wilef over 12 years ago
    I have the same issue.  Did a hotfix update this issue?
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
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