[Feature Request/Idea]Project/Booklet Object for grouping TD Pages

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
tobiasfalk
Posts: 93
Joined: Fri Feb 05, 2021 2:35 pm

[Feature Request/Idea]Project/Booklet Object for grouping TD Pages

Post by tobiasfalk »

With the comming Diagram(viewtopic.php?t=73654) parts of TD and even the current features, multiple pages is nothing uncommen. So I thing it would imrove the workflow if alls pages were no longer all in the directly in the Projekt but groped in a Project/Booklet where the globle settings thate are set in the TD Settings are saved for eache Page groupe, in other wordes the settings would be a templated for creating this Project/Booklet/Groupe and all other pages would take the settings out of this and not the gloable settings. Other things that would be nice to include in this would be thinks like Projekt name, creator name, organicacion name and so on, these could be filed out in the template automaticle so that filling out.
I know it is able to just move all the pages in to a folder, but this dous not give the mentined fetures.
User avatar
tobiasfalk
Posts: 93
Joined: Fri Feb 05, 2021 2:35 pm

Re: [Feature Request/Idea]Project/Booklet Object for grouping TD Pages

Post by tobiasfalk »

Things like the the Projekt name and so on could be Donezk by Text Variables, where you write <created_by> in the template or the text function of TD and it will be replaced with the value defined in the booklet. Limiting this to a set number of this would be sad, so this is somthing that should be expanded to be able to give "unlimited" number of variables.
Other things that would be nice to include would be the ability to set the page number, so that if exported or printed as a batch the order would be correct. If some day a Assambly standard is set in FreeCAD one could expand this to set pagenumber over the whole assembly and even export and print over it.
One other thing that this could give the ability to do, would be to create an the of contents.
User avatar
tobiasfalk
Posts: 93
Joined: Fri Feb 05, 2021 2:35 pm

Re: [Feature Request/Idea]Project/Booklet Object for grouping TD Pages

Post by tobiasfalk »

I have started on implementing such a manigment objekt.
It currently searches for variables in the templatet and thant creates two propertys for it, one is the value that is placed in the Template and the other is a list of all templated fields where the value is placed in to, this is for removing a field or adding(doing this is simpler by just writing the variable name in to a field).
The variable Struvture is the same as KiCAD(https://docs.kicad.org/master/id/eesche ... anced.html) and there are two predefined variables:
  • ${SCALE}, is replaced by the scale of the page
  • ${TITLE}, is replaced with the label/name
The pages are moved in to the BookletName_Groupe.
Attachments
BookletGroupe.py
(615 Bytes) Downloaded 24 times
BookletController.py
(4.8 KiB) Downloaded 24 times
Booklet.py
(67 Bytes) Downloaded 28 times
User avatar
tobiasfalk
Posts: 93
Joined: Fri Feb 05, 2021 2:35 pm

Re: [Feature Request/Idea]Project/Booklet Object for grouping TD Pages

Post by tobiasfalk »

I have updated it with the adition, that it creats a Text objekt where a Latex Code is inserteted so that it maks it easyer to include a group of sheets in to a Latex projekt.
Attachments
Macro.zip
(4.42 KiB) Downloaded 25 times
User avatar
tobiasfalk
Posts: 93
Joined: Fri Feb 05, 2021 2:35 pm

Re: [Feature Request/Idea]Project/Booklet Object for grouping TD Pages

Post by tobiasfalk »

I updated a few things and mostly did some more commenting.
If no one is interrested in this than I will stop posting Updates
Attachments
Macro.zip
(4.56 KiB) Downloaded 25 times
Post Reply