I don't think that the version inconsistency or lack of conversion matters much, at least not for me. In practice, if the Cosmetic Items fail, it's rather simple to delete them (with a working FreeCAD version), and then re-add them with the newest version. I don't mind re-adding a few dimensions every now and then, that happens a lot anyway; due to the infamous Toponaming issue. However, I'd be grateful for a fix to the crash when loading an offending file. IMO, it would be enough to detect and delete any offending Cosmetic Items at load time, re-adding them is really a rather small problem from user perspective.wandererfan wrote: ↑Wed Nov 06, 2019 12:49 pmI have introduced a file incompatibility between involving CosmeticVertex/CosmeticEdges/Centerlines. You may get "invalid XML errors" if loading a file from before approx mid Oct with the current software.
I don't have a conversion strategy at the moment.
Thanks for your continued efforts with improving TechDraw. At least for me, I've saved a ton of effort by using the new features you've developed, and I hope other users are also as grateful about them as I am. So, thanks a lot!Sorry folks.
My opinion is that this is not a problem. As long as it is within a development version, breaking compatibility like this is to be expected.
v0.19 is the first version with Cosmetic features, so we're safe there.
It isn't so much the items that are a problem, but the new attributes. The file loader starts looking for, say, "CLPoints" in Document.xml, then runs right to the end of the file because "CLPoints" isn't there.
Thanks, that'll certainly make it easier to deal with the old files. I looked at the code in your pull request, and maybe I understood it wrong; but won't deleting the "restoreCosmetic" parameter cause the function there to return 'false', and to not load the Cosmetics if the parameter is deleted? To me it seems that the parameter must be explicitly set to 'true' in order to restore the Cosmetics.wandererfan wrote: ↑Thu Nov 07, 2019 1:44 amIt isn't so much the items that are a problem, but the new attributes. The file loader starts looking for, say, "CLPoints" in Document.xml, then runs right to the end of the file because "CLPoints" isn't there.
To load a file with the old Cosmetics, create a "restoreCosmetic" parameter and set it to "false' as below. Remember to set it back to "true" (or delete it) after loading.