The script is simple but very long. Here is what it needs to do
- save all open files
- commit to svn
- destroy the output directory so no old files remain
- open the outjob file and alter the target folders for certain elements ( i can do this by calling an execuatable. The outjob file is human readable ascii and i have figured out how to alter it already. I call an .exe with command line arguments that patches the outjob file and then fire it off within altium. For example if a project is called project1-a-02 then the output folders for assembly need to be called assembly-02 and production-02. If the project is revised to a 03 the output folders roll as well. So the script reads the project filename figures out the 'stepping' and creates folders.
- export the pcb file and netlists in a few different formats and throw these in the production folders.
- zip the assy and production folders into project1-a-02-assembly.zip and so on.
- mark produced outputs for inclusion in svn
- commit to svn
- call an external program that creates entries in the PLM database for the new rev and uploads the different zip files
- send an email to procurement, the responsable engineer and production that a project relase has ahppened and the files are in the PLM tool.
This is a lengthy error prone process now. Mislabel or forget one folder and you get to redo it.
The process is simp,e enough , its just very annoying for a human. It takes an hour to do all that crap.
And the problem is : change a part value on the schematic and you get to roll the entire thing again.
Altering a small thing requires the entire output process to run so fab gets updated.
I already eliminated a lot of overhead by using project parameters and i jecting those in master templates.
The goal is to create a set of scripts where you go : i need a 4 layer flex board. Here is project number , this is the engineer , root step. Click one bjtton. Folders are created, pcb and schematic root files created, project created, svn folder created, plm database entry created, initia commit done.
Now i can focus drawing schematics and board.
When done. Call another script : output created. Done.
Need a revision ? Call a script that clones existing project, rolls stepping or revisin , patches the project properties and strings so the templates and output files / folders are all altered
I'm pretty far already. I got large parts automated but am missing some functions. The documentation is very, very bad for the available api commands. The autocomp,ete in altium doesn't even know half of the commands. You type iproject. And get a list of 4 methods. Well, there's over 50 ... Good ffing luck finding what it could be....