[Improvement] Autofill name and date in template

Discussions about the development of the TechDraw workbench
reox
Posts: 666
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: [Improvement] Autofill name and date in template

Postby reox » Sun Sep 22, 2019 5:21 pm

Okay, so I would propose to do that. Right now, there are plenty names:

Code: Select all

$ cd FreeCAD/src/Mod/TechDraw/Templates
$ git grep -h -o "freecad:editable=\"[^\"]*\"" | sort | uniq -c | sort -n
I think there should be some kind of core set of fields, which are present in every standard. For ISO7200, the must-have items are:
Legal owner (eg company)
Part number
date of issue
Section / page number
title
Approving person
creator
Document Type
(google translated from german wikipedia)

So the according names might just be:
FC_LEGAL_OWNER
FC_PART_NUMBER
FC_DATE
FC_SHEET
FC_TITLE (+ more lines?)
FC_APPROVOR
FC_CREATOR
FC_DOCUMENT_TYPE

and obviously FC_SCALE, which is probably used in most templates.
Other fields might be FC_REVISION, which would also be nice to be auto fillable.
vocx
Posts: 1898
Joined: Thu Oct 18, 2018 9:18 pm

Re: [Improvement] Autofill name and date in template

Postby vocx » Sun Sep 22, 2019 5:51 pm

reox wrote:
Sun Sep 22, 2019 5:21 pm
...
I think there should be some kind of core set of fields, ...
This is what I proposed in the first post. We need to define standardized names for the fields, however, so far nobody has done this. I have the feeling that wandererfan doesn't want to be the one to make this call. So, you or I, or whoever feels strongly about this should do it. If you can base your reasoning on a particular standard, then that's good.

Once the names are defined, then each SVG template that is included with FreeCAD should be updated to use those editable text fields.
reox
Posts: 666
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: [Improvement] Autofill name and date in template

Postby reox » Sun Sep 22, 2019 6:16 pm

Yes, I also saw your proposal, thats where I stole the FC prefix ;)
yeah, the standards discussion is a topic which have come up quite often... I personally never saw anything else than ISO7200 :mrgreen:
I think one really good starting point would be to gather all standards somewhere on a wiki page.
Or has anyone ever found such an overview?
User avatar
uwestoehr
Posts: 794
Joined: Sun Jan 27, 2019 3:21 am

Re: [Improvement] Autofill name and date in template

Postby uwestoehr » Sat Nov 02, 2019 1:01 am

wandererfan wrote:
Sun Sep 22, 2019 4:07 pm
I like the macro!
vocx kindly pointed me to this thread. In https://forum.freecadweb.org/viewtopic. ... 64#p344653 I was asking to automatically get the scaling factors output.
Due to my experiences with workshops it is in my opinion very important that the user do not manually enter values to a drawing. Therefore the values of dimensions are automatically output from the part. Unfortunately this is not yet the case for the scale.

In my opinion the page scale should automatically be output in the page's SCALE field.
Moreover, every View and every ProjectionGroup can have its own scaling factor. So in cases where the scaling factor differs from the page scaling factor it should automatically be output e.g. under the frame of the view. If the user really wants to hide this, he can do so. But only with an automatic output one can avoid typical human mistakes like typos when manually specifying the scaling factor in the drawing.

So instead of providing a macro, this behavior should be offered by TechDraw. Also Catia and Solidworks offer this so there must be a good reason.