Autoplot PDF etc when saving project

Bug #1636549 reported by Frank Severinsen on 2016-10-25
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
KiCad
Wishlist
Mudit Joshi

Bug Description

Hey Guys

thanks for the awesome job!

At my company we came up with a feature request, which I think could easily be beneficial to others.
The idea is simply to add an option to automatically replot the PDF whenever the schematic is saved.

It is often necessary to share the project on git with software developers or other team members who only need to consult the schematics, without applying changes.
As they would normally rely on the .pdf provided in the repository, it is particularly important to keep it up-to-date with the .sch document.

Currently this is a manual process which is both time-consuming and prone to being overlooked; by adding this feature the PDF would always reflect the content of the schematics.

I made a quick mockup on how it could look but it is only meant as an idea of how this could be implemented

Cheers
Frank Severinsen

Frank Severinsen (shack) on 2016-10-26
description: updated
Wayne Stambaugh (stambaughw) wrote :

I'm not sure I like this idea. I know for what I do at work, this would be annoying. I would have to clean out the unwanted pdf files from the project folder every time I saved the schematic. The only way I would approve a change like this is if A: it could be disable by the user (default) and B: it could be configured to write the pdf files in a folder other than the current project folder. Hopefully in the not too distant future, we will get the python scripting support implemented for the schematic editor. This feature seems like it would better to implement as a user script.

Frank Severinsen (a-frank-b) wrote :

Hey Wayne

Thanks for the response
As shown in the photo my idea was to have the user check the checkbox (default off) to have Eeschema replot on every save. I don't quite get what you mean with unwanted PDF files(different revisions?), my idea was to update only one PDF. Regarding where to save the file I was hoping it could reuse the place set when plotting (default is project folder). Hope this clears up things

Frank Severinsen (shack) on 2016-10-27
information type: Public → Public Security
information type: Public Security → Public
information type: Public → Public Security
information type: Public Security → Public

This is a cool idea! It should probably be disabled by default, but having the option to enable it, and always have an up to date PDF of the schematic in the repo is awesome. Software guys are going to love that!

I'm OK with an option that defaults to off and using the plot path.

I don't want any unnecessary files (pdf or otherwise) in my project
folders that are not required so any plot or print files except gerbers
are just noise to me because I don't use them. I would find it annoying
to always create them on file save. That is what I meant by unwanted
pdf files.

On 10/26/2016 5:48 PM, Frank Severinsen wrote:
> Hey Wayne
>
> Thanks for the response
> As shown in the photo my idea was to have the user check the checkbox (default off) to have Eeschema replot on every save. I don't quite get what you mean with unwanted PDF files(different revisions?), my idea was to update only one PDF. Regarding where to save the file I was hoping it could reuse the place set when plotting (default is project folder). Hope this clears up things
>

Changed in kicad:
importance: Undecided → Wishlist
xzcvczx (xzcvczx) wrote :

I agree with wayne that it would be more suitable for a user script that adding it to the dialog unnecessarily

Nick Østergaard (nickoe) wrote :

@Simon, but I think it would be an "easy" option to have in the mean time. We all know that it will still take quite some time before scripting will be supported in eeschema.

tags: added: starter
Mudit Joshi (joshi-ji) on 2018-06-06
Changed in kicad:
assignee: nobody → Mudit Joshi (joshi-ji)
Mudit Joshi (joshi-ji) on 2018-06-06
Changed in kicad:
status: New → In Progress
Mudit Joshi (joshi-ji) wrote :

Add support in eeschema to autoplot schematic in PDF format whenever schematic is saved.

Frank Severinsen (shack) wrote :

@mudit thank you very much for doing this :)
Hopefully one of the lead devs will have look at the patch soon :)

Jeff Young (jeyjey) wrote :

We're in feature freeze for 5.0 right now, but it should go out very soon now, and then we can look at stuff for the next release.

Changed in kicad:
milestone: none → 6.0.0-rc1
Frank Severinsen (shack) wrote :

Hi Jeff
Do you think something like this could be added in V5.1? V6.0 seems so far away :) Since I use KiCad Professionally, and don't have the skillset to debug the code, I have a strong preference for stable releases at work :)

Frank Severinsen (shack) wrote :

@Mudit I tested the Patch and it works great :) thank you for the work

Nick Østergaard (nickoe) wrote :

I guess we can evaluate bugs assigned to the milestone KiCad 6.0.0-rc1 when we thin we could release a 5.1.

Non-interactive generation of PDF output is indeed a very useful feature.

However, adding this specific functionality to the GUI and to the program code takes KiCad in a direction I would prefer not to see.

The reason is that this kind of functionality does not scale well with the possible use cases, and may generate the GUI and code base unmanageable.

Consider for example automatic generation of the following when a schematic is saved:
- Perform electrical rule check
- Automatic BOM generation, possibly with different BOM exportes
- Automatic netlist generation to user selectable format.
- Plot to any of Postscript, SVG, DXF, HPGL, in either Color or "Black and white", etc.

The example above are all useful features and likely use cases.

Therefore, the scripting solution as suggested by Wayne and xzcvczx is the preferrable.

One could imagine a user defined a Python script ("hook") which executes every time the schematic is saved. That hook could use the Python API to generate the PDF, PS, BOM, etc. One could also imagine a pre-save hook which brings up a warning (or prevents saving) if electrical rule check failed before save. The point is that this method is much more flexible and fully decoupled from the eeschema program logic.

Thank you

Wayne Stambaugh (stambaughw) wrote :

I reviewed this patch and while it does solve a problem, I do not care for the solution. It has too many issues is not a complete solution for plotting. Here is a short list of issues:

The plot on save setting it part of the dialog. This setting has nothing to do with the plot dialog and should be handled in the schematic editor code.

The plot type and setting will always be the last plot the user performed using the plot dialog. This may or may not be what the user expected and there is no way to set this without performing a plot using plot dialog.

The plotting is called before the schematic is saved and the cache library is saved. If something causes the plotting to crash, the schematic will not be saved and the cache library will not be saved. I consider this a grave design flaw. Saving the schematic should be a priority over plotting.

I am planning to create a plot manager feature for Pcbnew which would allow for complex plotting requirements including multiple plots, custom file name suffixes, prefixes, and extensions, custom destination folders, etc. This should lay a foundation for a similar feature in Eeschema. It will be a while before I get to this because the new schematic file formats are my next project after the stable 5 release. I am hesitant to apply this patch because it will be removed at some point in the future. If there is enough support for this, I would consider it if you move the check for plot on save out of the dialog code and into the schematic editor frame code and you moved the plotting after the schematic and cache library are saved.

For example, some save window dialog (of other softwares) have some check box (see https://www.exceldemy.com/wp-content/uploads/2014/01/save-as-dialog-box.png) to allow some option.
This may be one way to implement in the "save as" dialog.

ronnie (ronnie81) wrote :

@Wayne in respect with your plans introducing a plot manager, I assume this is not a "starter" anymore and will remove that tag.

tags: added: export
removed: starter
Wayne Stambaugh (stambaughw) wrote :

@ronnie, this is definitely not a starter project. It will require a
new file format for saving and loading the plot configurations, support
for plotting from the command line (preferably without showing the UI),
and python scripting support.

On 8/25/2018 8:07 PM, ronnie wrote:
> @Wayne in respect with your plans introducing a plot manager, I assume
> this is not a "starter" anymore and will remove that tag.
>
> ** Tags removed: starter
> ** Tags added: export
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers