Variables in Templates

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
SIXe
Posts: 154
Joined: Sat Mar 16, 2019 3:10 pm

Variables in Templates

Post by SIXe »

Is there a way to automatically populate the fields that are common to all sheets (AUTHOR, TITLE, Part Number, Date)? For each new sheet I have to fill in the same information. Sometimes I forget or mistype a value.

Is there a way to populate common fields in all sheets?

Code: Select all

Version: 0.20.29126
HowThatWorks
Posts: 40
Joined: Mon Feb 10, 2020 4:27 pm
Contact:

Re: Variables in Templates

Post by HowThatWorks »

The only method that I can think of is to make a copy of the template that you use, open it in Inkscape, fill in the information, then set the pre-filled sheet as your default template template.
SIXe
Posts: 154
Joined: Sat Mar 16, 2019 3:10 pm

Re: Variables in Templates

Post by SIXe »

That might work for the name, but not for

- title
- scale
- part number
- drawing number
- date
- revision

Then I would still need to edit six values on each sheet. I don't think that's a feasible solution. Thanks for the suggestion, anyway.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Variables in Templates

Post by wandererfan »

SIXe wrote: Fri Jul 08, 2022 12:22 pm Is there a way to automatically populate the fields that are common to all sheets (AUTHOR, TITLE, Part Number, Date)?
I think this is issue #5903.
SIXe
Posts: 154
Joined: Sat Mar 16, 2019 3:10 pm

Re: Variables in Templates

Post by SIXe »

Yes, I think that's the same problem. So I guess that's a “no, that's not possible” then.
User avatar
kaktus
Veteran
Posts: 1174
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: Variables in Templates

Post by kaktus »

well
This problem has also bothered me for a long time but I did not ask about its solution.

But since FreeCAD in the configuration has fields into which you enter some information like author ... etc. then why not link them?

The date can be read from the system time ...
etc
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
cadcam
Posts: 273
Joined: Thu Apr 02, 2020 10:39 am

Re: Variables in Templates

Post by cadcam »

I use a start part with a prefilled spreadsheet with all common information that in turn is
used to prefill templates etc. Works quite nicely and relatively easy to change values

Regards
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Re: Variables in Templates

Post by Laurie Hartley »

cadcam wrote: Wed Jul 13, 2022 8:55 am I use a start part with a prefilled spreadsheet with all common information that in turn is
used to prefill templates etc. Works quite nicely and relatively easy to change values

Regards
Could you elaborate on this please as I am about to create a series of about 20 drawings - one of the fields will be “Page # of #. Your approach sounds like it can save a lot of work and I think perhaps the guys on the ARCH and BIM forums will be particularly interested in this.
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: Variables in Templates

Post by FBXL5 »

Have a look at: Macro_TemplateHelper

This macro generates templates on the fly and can copy entries from a first page. It might not create the title block you prefer, but it could be a basis for your own design.
I use a version that is adapted to my own needs and it works quite well.

I cannot promise that it runs out of the box as described, because I haven't received any feedback yet...
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Re: Variables in Templates

Post by Laurie Hartley »

FBXL5 wrote: Mon Jul 18, 2022 7:42 am Have a look at: Macro_TemplateHelper

This macro generates templates on the fly and can copy entries from a first page. It might not create the title block you prefer, but it could be a basis for your own design.
I use a version that is adapted to my own needs and it works quite well.

I cannot promise that it runs out of the box as described, because I haven't received any feedback yet...
Thanks for your response.
I am away from my pc for a couple of days but I will try it and provide feedback
Post Reply