Altium: PCB Export Script wanted.  - Page 1
Forum section: electronics / general

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: May 04, 2017, 12:59:03 am
content: HiI was wondering if anyone has done an Altium PCB Export Script?Basically to run DRC and if passed then export Gerbers of all present layers, drill files and then zip them up into a package. so that I can send them to PcbWay or Seeed or similiar.Seems like such an obvious thing to script, that I was sure someone had done it.Had a look for other threads but couldn't find anything much except.https://www.eevblog.com/forum/altium/anyone-familiar-with-scripting-in-altium/

author: ajb
author_rank: Super Contributor
timestamp: May 04, 2017, 11:56:13 am
content: Are you familiar with outjobs? Once you have one setup, your gerber+drill plus whatever other documentation you want can be exported to a specified folder with a single click. It won't zip them for you, although I think there's an active BugCrunch request or two for that.So that just leaves DRC, which is only another click or two. And you probably want to do some manual review for things that DRC won't catch before you export the fab files anyway, so that part can't be scripted.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: May 04, 2017, 01:30:09 pm
content: I have read of them but I assumed that they were just an older version of the scripting interface.I haven't seen a concrete example though.I am using AD16.I basically want to automate the process because sometimes I do a pile of student boards and if I can speed it up and reduce fabrication output mistakes then it will be good.I try not to look at the boards....So what is the difference between outjobs and scripting?I would like to set Design rules from script too to force each board to match the manufacturers DR.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 04, 2017, 02:16:45 pm
content: Quote from: ajb on May 04, 2017, 11:56:13 amI've got OutJobs with 6 (and I've seen more) containers, so it's a minimum 12 clicks, plus monitoring if the checks (ERC, DRC, differences) throw errors. Combine this with network-drive output and it can be quite a time sink...Tim

author: ajb
author_rank: Super Contributor
timestamp: May 08, 2017, 01:17:05 pm
content: Outjobs are a specific file type that define different sorts of outputs that can be generated from a project. Gerbers, schematic prints, STEP files, BOM, basically any sort of output that Altium can generate can be defined in an outjob and assigned to a specific container (PDF file or file folder). From the outjob, you can generate all of the required outputs for a given container in one step.For the design rules, it's probably easiest to give your students a PCB template file that already has the proper design rules defined so that the students can design the board with them in place. You can then re-import your design rules before doing final DRC and fab outputs to ensure they haven't changed the design rules to allow something naughty.Scripting all of that may be possible, but. From the little bit of time I've spent on scripting, the documentation is pretty lackluster and is inconsistent between scripting languages (actually, I think the *API* is inconsistent between scripting languages) and there are a number of frustrating limitations.

author: tszaboo
author_rank: Super Contributor
timestamp: May 08, 2017, 01:35:49 pm
content: Quote from: T3sl4co1l on May 04, 2017, 02:16:45 pmYes, you need to do this every time when you are preparing to wait a few weeks to get assembled PCBAs. Its not that bad. Imagine, you working in a big company, you need to print your output, send it to head engineer to get a signature, upload it to an ERP system, etc...

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: May 09, 2017, 01:44:42 am
content: Ok, I got part way there with outjobs and a manual bit of manual work.Would be nice to automate a bit more, mainly to reduce human error, but I wont be investing any time into it atm.Thanks for the input.