The link to the TechDraw template is lost when doing "Save as" after the file has already been saved. The issue is confirmed on both MacOS and Ubuntu. Steps to reproduce:
1) Create a new Document in FreeCAD
2) Add a new TechDraw page in the TechDraw workbench
3) Save the document in a location
4) Close the document internally (close the tabs but keep the same FreeCAD window open)
5) Reopen the same document
6) Save the document by "Save as" with a new filename
7) Make a change in the template field (eg. date) and recompute it
The connection to the template should now be lost
Reported by the bughunter @wolflu05
Video for lazy purposes: https://youtu.be/tWtotlsUQZM (credits once again to @wolflu05)
This issue is the same as https://forum.freecadweb.org/viewtopic.php?t=25081 but under a different use case that a lot more common: it is simply if the file is re-saved and not necessarily making a copy and closing one of the copies after having both open. I have made a GitHub issue so it won't be lost: https://github.com/FreeCAD/FreeCAD/issues/7376
Issue #7376 - [Bug] Link to TechDraw template is lost when a document is resaved
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Issue #7376 - [Bug] Link to TechDraw template is lost when a document is resaved
Last edited by Kunda1 on Sun Aug 21, 2022 2:52 pm, edited 3 times in total.
Reason: Added GH ticket number to thread title
Reason: Added GH ticket number to thread title
Re: [Bug] Link to TechDraw template is lost when a document is resaved
A label change.
After having saved as under a new filename, changed a label and then recomputing the template, you should get a linkage error.
See the video if necessary
Re: [Bug] Link to TechDraw template is lost when a document is resaved
The videos was not working before, it was on privae. Now it works.
A label (properties) change works, but not an editable field (like in the video). So i can confirm the issue.
Code: Select all
Log: DrawSVGTemplate::execute() not able to open /home/user/.cache/FreeCAD/Cache/FreeCAD_Doc_56ae100c-648e-4328-898b-e1d82ee7dcd1_7b1132_49315/A4_Landscape_ISO7200TD.svg!
Log: DrawSVGTemplate::execute() not able to open /home/user/.cache/FreeCAD/Cache/FreeCAD_Doc_56ae100c-648e-4328-898b-e1d82ee7dcd1_7b1132_49315/A4_Landscape_ISO7200TD.svg!
Err: Recompute failed! Please check report view.
Code: Select all
OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.21.30092 (Git)
Build type: Release
Branch: master
Hash: f2ba030ebb12c0d0a96a9d7aabdc02aa8ba89dda
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 9.0.1, OCC 7.6.3
Locale: English/United States (en_US)
Greetings
user1234
Re: [Bug] Link to TechDraw template is lost when a document is resaved
It is ok, now that the issue is confirmed. But please follow in the future our bug reporting process, which says to discuss an issue before creating a report. Otherwise we get tons of reports which actually are none.bensay wrote: ↑Wed Aug 17, 2022 10:01 pm I have made a GitHub issue so it won't be lost: https://github.com/FreeCAD/FreeCAD/issues/7376
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: [Bug] Link to TechDraw template is lost when a document is resaved
Most of the Template code is original and needs a big overhaul. I don't expect to look at this issue until that overhaul takes place.
Re: [Bug] Link to TechDraw template is lost when a document is resaved
Can you give some more details about the overhaul? Maybe it will be on my todo listwandererfan wrote: ↑Thu Aug 18, 2022 2:52 pm Most of the Template code is original and needs a big overhaul. I don't expect to look at this issue until that overhaul takes place.
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: [Bug] Link to TechDraw template is lost when a document is resaved
Off the top of my head:
- replace the green dots and dialogs with proper data entry fields on the page
- handle PropertyFileIncluded with setup and replace functions as in DrawHatch, DrawGeomHatch, etc
- move the Svg parsing code out of execute(), similar to DrawSymbol
- clean up onChanged
The second item will probably fix the issue reporting in this post.