Using Outjob Templates in  Altium 24.4.1 /  Alitum 365 - Page 1
Forum section: electronics / general

author: Psi
author_rank: Super Contributor
timestamp: August 15, 2024, 04:41:07 am
content: I'm trying to get outjob templates working in Altium 24.4.1I can setup a cloud based outjob template and load it into any project, that all works fine.What I'm not sure about is how you handle the situation where your file names are different betwen projects. (the datasource column in the outjob).eg, in a project you might have one .PCBdoc that is your PCB and another that is a panelized version of your PCB. And these will have different file names in one project vs another. So how do you have one outjob that can pickup the different datasources?

author: Psi
author_rank: Super Contributor
timestamp: August 15, 2024, 05:33:02 am
content: Seems like you have to use generic file names in all projects. eg Main.PCBdoc and Panel.PCBdoc. rather than your internal part numbers for that part/project.Then it doesn't matter and one outjob can find them across projects.Also, if anyone was wondering, to select what layers you want gerbers for on each project you simply create a layer class in each project and add the layers to there. Then you can use that class in the outjob

author: tszaboo
author_rank: Super Contributor
timestamp: August 15, 2024, 11:31:02 am
content: What's wrong with copying your template outjob into the project folder?Imagine that you have 2 or 4 layer board, your Gerber output is different anyway.You can work around your original idea a bit by defining "[PCB Document]" as "Data Source".

author: ajb
author_rank: Super Contributor
timestamp: August 15, 2024, 05:44:14 pm
content: Doing as tszaboo suggests is the easiest option, but doesn't always work for all projects/output types. Fixed file names ("Main.PCBdoc" and "Panel.PCBdoc") can also work, but can get confusing if you work on more than one project, or if the files may become separated from the project.I haven't played with the cloud stuff, but I assume they work like a normal outjob (or several different outjobs) added to your template project. Once you create a new project created from that template you should be able to modify the independent copy of the outjob to suit the project's needs. That's the most flexible option, but does require a bit of work to update projects if/when the outjob changes.

author: Psi
author_rank: Super Contributor
timestamp: August 15, 2024, 10:54:28 pm
content: Quote from: ajb on August 15, 2024, 05:44:14 pmIt is a normal outjob yes, but most settings are locked from editing. You have to go edit the template and reapply it.They're intended to lock down output standards for a company, so all engineers produce outputs that are all using the same settings and in the same folder structures.It's also really nice to have the settings all in one place. So if you need to change some server folder paths you don't have to change them in every project's outjob.Quote from: tszaboo on August 15, 2024, 11:31:02 amMainly if you have to change some global setting you have to go change it in every single outjob.Usually some settings have been messed with in each project and are unique to that which means you cant just copy one outjob to all projects to perform a global change.By locking it down and having templates it forces things to be more controlled and easier to edit.The gerber outputs for 2 vs 4 layer is fine. They have taken care of that using each projects layer class to control what layers get their gerbers exported. Instead of having specific layer tickboxes in each outjob.The "[PCB Document]" as "Data Source" doesn't work if your project has more than one PCBdoc, like for single vs panel version. Different lines of your outjob need to use both.

author: ajb
author_rank: Super Contributor
timestamp: August 16, 2024, 01:56:50 am
content: Quote from: Psi on August 15, 2024, 10:54:28 pmYeah, that makes sense. I've spent a lot of time trying to wrangle our outjobs into shape over the last year. We do tons of small projects, which magnifies the problem of keeping everything up to date. Not wanting to get wrapped up in any more cloud platforms, our compromise has been to move all of our Altium templates to a git repo, which is cloned to the path where Altium looks for templates. We append a version number to the standard outjob file names, since those are the only changes that generally need to be pulled into projects when the templates are updated. You might be able to use git submodules for similar purposes, but I'm not sure if you can get Altium to track relative paths to templates?There are a lot of areas where outjobs don'tquiteoffer the flexibility/granularity I want, so for a couple of specific cases I've written python* scripts to post-process the files. You can create a windows shortcut link that accepts files/folders via drag-and-drop and passes them to the script, so they're dead simple to use (and of course they're also in version control!). I currently have them splitting a single schematic PDF into separate specifically-named sets of pages based on embedded parameter-driven text, and rebuilding BOM data plus a bunch of project metadata into a couple of CSVs with stupid ERP-specific formats. The Excel template export option in particular for BOM outputs allows you to get a ton of data out of the project, including custom parameters from components, sheets, projects, variants, etc, and there are quite good python libraries that make it very easy to extract that data. So as long as you include a BOM somewhere in the set of outputs, you could use any of that information to rearrange/slice/dice other output files however you want. I've been thinking about doing that for CM packages, but that's still a 'someday' thing. It makes me really interested in KiCad's python integration, and being able to programmatically control output generation from the beginning of the pipeline (I assume, I haven't looked).* not that I particularly like python, but damn if it isn't useful for things like this

author: tszaboo
author_rank: Super Contributor
timestamp: August 16, 2024, 06:40:32 am
content: Quote from: Psi on August 15, 2024, 10:54:28 pmI've checked with Altium support some time ago, and you are not supposed to do that. It's supported but not very well.I get what you are trying to do, IMHO it wouldn't work in practice over several years.