Author Topic: Altium: PCB Export Script wanted.  (Read 5224 times)

0 Members and 1 Guest are viewing this topic.

Offline HackedFridgeMagnetTopic starter

  • Super Contributor
  • ***
  • Posts: 2034
  • Country: au
Altium: PCB Export Script wanted.
« on: May 04, 2017, 12:59:03 am »
Hi
I 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/



 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2721
  • Country: us
Re: Altium: PCB Export Script wanted.
« Reply #1 on: May 04, 2017, 11:56:13 am »
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.
 
The following users thanked this post: ahbushnell

Offline HackedFridgeMagnetTopic starter

  • Super Contributor
  • ***
  • Posts: 2034
  • Country: au
Re: Altium: PCB Export Script wanted.
« Reply #2 on: May 04, 2017, 01:30:09 pm »
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.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22386
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Altium: PCB Export Script wanted.
« Reply #3 on: May 04, 2017, 02:16:45 pm »
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.

I'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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2721
  • Country: us
Re: Altium: PCB Export Script wanted.
« Reply #4 on: May 08, 2017, 01:17:05 pm »
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.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7909
  • Country: nl
  • Current job: ATEX product design
Re: Altium: PCB Export Script wanted.
« Reply #5 on: May 08, 2017, 01:35:49 pm »
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.

I'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
Yes, 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...
 

Offline HackedFridgeMagnetTopic starter

  • Super Contributor
  • ***
  • Posts: 2034
  • Country: au
Re: Altium: PCB Export Script wanted.
« Reply #6 on: May 09, 2017, 01:44:42 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf