Author Topic: Scripting gerber generation  (Read 387 times)

0 Members and 1 Guest are viewing this topic.

Offline Rachie5272

  • Regular Contributor
  • *
  • Posts: 143
Scripting gerber generation
« on: January 06, 2019, 06:49:01 am »
Is there a reasonable way to script the generation of gerber/drill files, to make it a single command operation?  Right now I have to go to the fabrication output gerber menu, manually check every option in the dialogue box (they keep resetting), generate the files, close the annoying gerber viewer, delete the extra garbage files, then repeat for the NC drill file.

Surely there must be a better way.  I've looked into scripting for altium, but I have no idea how to interface with their system.  How do I go about adding this sort of functionality?

Additionally, is there a way to create more readable filenames for the gerber output?  It generates a dozen files with the exact same project name, differing only in the extension.  I'd rather not waste time trying to interpret what "project.gbs" means, when it could be a much more obvious "project_bottom_solder_mask.gbs".
« Last Edit: January 06, 2019, 07:03:27 am by Rachie5272 »

Online ajb

  • Super Contributor
  • ***
  • Posts: 1538
  • Country: us
Re: Scripting gerber generation
« Reply #1 on: January 06, 2019, 12:13:27 pm »
This is what outjobs are for.  There are some limitations, but you can set it up so that an entire contract assembly package -- gerbers, drill files, BOM, pick-and-place, stackup report, etc -- are generated with one click.  You can also set up jobs for documentation outputs.

I don't think you can set the name of the gerber outputs on a per-layer basis.  The standard extensions are at least sort of mnemonic:

T = Top
B = Bottom

L = Copper Layer
S = Solder Mask
O = Overlay (silkscreen)
P = Paste Mask

1,2,3 = additional copper layers, numbered from top to bottom

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 7018
  • Country: us
    • SiliconValleyGarage
Re: Scripting gerber generation
« Reply #2 on: January 07, 2019, 04:04:00 am »
you don't want to mess with naming and extensions.

format is <board_name>.<layer>

the gerber processors are all working on that principle. if you deviate from that you will get lots of questions from the company that needs to read your data...

Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).

Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo