With the tutorial in the wiki I have now a very nice custom template for drawings which I am very fond of.
Now I have looked for ways to automatically fill in some of those fields. Obvious candiates would be
sheet number
filename
scale
creation date
author
I found this post about changing it from script, but this was for a different use case.
I am looking for those values being filled automatically every time when I load a template for a file. Did anyone achive something like this and can tell how this can be done?
Relatedly I have been looking at trying to simplify the filling in of a template
from a spreadsheet, which inturn is auto filled from defaults, using a Macro. I would like to know if I am
approaching this the correct way or so if someone has already done this, or more probably neater/better way, before?
Some of the problems still to be solved, in no particular order
Ensuring that each page is automatically associated with a specific spreadsheet, without having
obtain the page number/same in macro.
Is it possible to copy/paste and attach User_info to a page, rather than overall file.
Make spreadsheet more general by Auto loading with system known parareters, e.g. user name, pagesize, part weight but still allow
included file to be edited
Extend for Assembly drawings
plenty of others..
Many Thanks
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22111 (Git)
Build type: Release
Branch: master
Hash: cb2099aa6bb287a8d7843eb70684cce79bdef26b
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB) dut_Drawing_Update_template.FCMacro (2.96 KB) fitting2_demo.FCStd (691 KB)
interesting approach. How do you generate the spreadsheet in the first place? For example if you need to generate a new part, starting with a blank sheet, where does it take its data from?
Currently working with âstartpartsâ, with spreadsheets/associated drawings, material,⌠etc preset,
so that when you select new part, via a macro, it loads it and then changes the filename etc.
so that you donât override etc. Thus the basic spreadsheet is pre-loaded, however as noted still not sure how to generate for multiple drawing sheets, although I am thinking as a backup to store the info in the spreadsheet and get the macro to cope with finding the
correct template
When swapping the template to another one with the property field value Tempalte/Template today all edited filed parameters are lost.
Since the data has been added manually and is stored in TechDraw, is that situation something to not thow away the edited values, so if a new template is loaded (that likely has the same value names) the stored values could be applied?
Use case: Allows to switch format any time. Description: When âMyFormat_A4â is getting too small, its possible to switch to âMyFormat_A3â without loosing all edited data. This is because its very likely that most people use in all âMyFormatâ templates the same fields.
That is true, but if some are not present, nothing is lost except a few bytes unused data. If the behaviour is know, however its easy for people doing their own templates to just use the same names. And I guess, most people who are serious about their models are going to customize the default templates anyway.
Should there be a concept of TechDraw âdocuments/workbooksâ? Could anyone provide a use case where user would want a single TechDraw page, say sheet 19 of 30 designed in FreeCAD?
Are there any standards/file formats of technical drawing documents other than sheet-level graphical symbols like title block, line width, dimensions, etc?
Is it realistic to prepare all technical drawings in FreeCAD?
Depending on the answers, we could design a âworkbookâ object which would have a single template and guarantee field names to be the same, provide automatic numbering, the title page, legends, consistent scale, and so on
In addition, itâs possible to ship embedded templates, where field names are standardized. Or we could validate templates and force users to design them so that they have predefined fields
Unfortunately, I have a feeling that FreeCAD has a different philosophy - it doesnât help users with enforcing standards or consistency. Instead, FreeCAD provides some tooling on top of which you build your own software. I think this philosophy sucks
Thatâs not necessarily because we donât want to, but because the effort to do so is high. If you want to move towards that direction, your contributions to do so would be appreciated.
Please donât quote complete posts. We donât want to read everything twice. Cite only what you are directly referring to. You may elaborate what models you are doing and where exactly it would help.
Create a root TechDraw document/workbook class/object
Modify getters of TechDraw page fields to check whether they have a document parent and return the fields from parent
If thereâs a parent, make certain fields of a page read-only/hidden. Possibly with an option to override.
Add actions/buttons/menus to rearrange the order of TechDraw pages
Display the page number in the object tree
Extra feature: display all the pages in a single MDI tab with Next/Prev page buttons.
After that: print all the pages in a single PDF. Possibly with ability to select page ranges to print
Somewhere in the future: deprecate rootless pages.