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.
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.txtThe 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
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.