I want to address the wall preset issue that has been dogging me for way too long.
My idea has always been to make the storage system for the presets manually editable by the user (if required) so I have simply stored the data as long strings of text in a simple text file (.txt)
Here is an example of a bunch of wall presets:
Medeek Wall Preset File
2|Stucco Rockwool|20210510115553|Int-Ext|Front|97.125|80.0|5.5|1.5|16.0|Left|0.0|2|1.5|1|1.5|NO|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|YES|0.4375|FLUSH|YES|0.25|0.0|MITER|YES|5.0|NO|YES|0.0|0.0|0.0|0.0|0.0|ZIP_12|STUCCO_LIGHT_TAN|WALLGYPSUM|RKW|YES|NO|NO|NO|NO|0.5|WALLGYPSUM|NO|0.4375|FLUSH|ZIP_12|Center|YES|1|48.0|ON SHEATHING|0.75|YES|3.5|YES|3.5|YES|#ffffff|YES|3.5|0.75|NO|48.0|YES|5.5|0.75|NO|YES|7.25|0.75|YES|YES|0.75|1.25|36.0|4.0|1.0|MITER|BRICK_RED|YES|4.0|1.0|YES|0.0|0.0|MODE1|BRICK_RED|A|16.0|12.0|12.0|2.0|1.0|QUOIN
3|Stucco Pink|20210510124401|Int-Ext|Front|97.125|80.0|5.5|1.5|16.0|Left|0.0|2|1.5|1|1.5|NO|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|YES|0.4375|FLUSH|YES|0.25|0.0|MITER|YES|0.5|YES|NO|0.0|0.0|0.0|0.0|0.0|OSB_FELT|STUCCO_LIGHT_TAN|WALLGYPSUM|PFG|NO|NO|NO|NO|NO|0.5|WALLGYPSUM|NO|0.4375|FLUSH|OSB_FELT|HDU8|0.0|SB78-24|24.0|BOTH|FRAMING|Center|YES|1|48.0|ON SHEATHING|0.75|YES|3.5|YES|3.5|YES|#ffffff|YES|3.5|0.75|NO|48.0|YES|5.5|0.75|NO|YES|7.25|0.75|YES|YES|0.75|1.25|36.0|4.0|1.0|MITER|BRICK_RED|YES|4.0|1.0|YES|0.0|0.0|MODE1|BRICK_RED|A|16.0|12.0|12.0|2.0|1.0|QUOIN
4|test2|20210510145752|Int-Ext|Front|97.125|80.0|5.5|1.5|16.0|Left|0.0|2|1.5|1|1.5|NO|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|YES|0.4375|FLUSH|YES|0.25|0.0|MITER|YES|0.5|NO|NO|0.0|0.0|0.0|0.0|0.0|OSB|HARDI_CM_HM|WALLGYPSUM|PFG|NO|NO|NO|NO|NO|0.5|WALLGYPSUM|NO|0.4375|FLUSH|OSB|HDU8|0.0|SB78-24|24.0|BOTH|FRAMING|Center|YES|1|48.0|ON SHEATHING|0.75|YES|3.5|YES|3.5|YES|#ffffff|YES|3.5|0.75|NO|48.0|YES|5.5|0.75|NO|YES|7.25|0.75|YES|YES|0.75|1.25|36.0|4.0|1.0|MITER|BRICK_RED|YES|4.0|1.0|YES|0.0|0.0|MODE1|BRICK_RED|A|16.0|12.0|12.0|2.0|1.0|QUOIN
5|4/2 Wall|20210510145837|Int-Ext|Front|97.125|80.0|5.5|1.5|16.0|Left|0.0|2|1.5|1|1.5|NO|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|YES|0.4375|FLUSH|YES|0.25|0.0|MITER|YES|0.5|NO|NO|0.0|0.0|0.0|0.0|0.0|OSB|HARDI_CM_HM|WALLGYPSUM|PFG|NO|NO|NO|NO|NO|0.5|WALLGYPSUM|NO|0.4375|FLUSH|OSB|HDU8|0.0|SB78-24|24.0|BOTH|FRAMING|Center|YES|1|48.0|ON SHEATHING|0.75|YES|3.5|YES|3.5|YES|#ffffff|YES|3.5|0.75|NO|48.0|YES|5.5|0.75|NO|YES|7.25|0.75|YES|YES|0.75|1.25|36.0|4.0|1.0|MITER|BRICK_RED|YES|4.0|1.0|YES|0.0|0.0|MODE1|BRICK_RED|A|16.0|12.0|12.0|2.0|1.0|QUOIN
6|120wall|20210606121902|Int-Ext|Front|120.0|80.0|5.5|1.5|16.0|Left|0.0|2|1.5|1|1.5|NO|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|YES|0.4375|FLUSH|YES|0.25|0.0|MITER|YES|0.5|NO|NO|0.0|0.0|0.0|0.0|0.0|OSB|HARDI_CM_HM|WALLGYPSUM|PFG|NO|NO|NO|NO|NO|0.5|WALLGYPSUM|NO|0.4375|FLUSH|OSB|HDU8|0.0|SB78-24|24.0|BOTH|FRAMING|Center|YES|1|48.0|ON SHEATHING|0.75|YES|3.5|YES|3.5|YES|#ffffff|YES|3.5|0.75|NO|48.0|YES|5.5|0.75|NO|YES|7.25|0.75|YES|YES|0.75|1.25|36.0|4.0|1.0|MITER|BRICK_RED|YES|4.0|1.0|YES|0.0|0.0|MODE1|BRICK_RED|A|16.0|12.0|12.0|2.0|1.0|QUOIN
7|150HD|20210606122002|Int-Ext|Front|150.0|80.0|5.5|1.5|16.0|Left|0.0|2|1.5|1|1.5|NO|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|YES|0.4375|FLUSH|YES|0.25|0.0|MITER|YES|0.5|NO|YES|0.0|0.0|0.0|0.0|0.0|OSB|HARDI_CM_HM|WALLGYPSUM|PFG|NO|NO|NO|NO|NO|0.5|WALLGYPSUM|NO|0.4375|FLUSH|OSB|HDU8|0.0|SB78-24|24.0|BOTH|FRAMING|Center|YES|1|48.0|ON SHEATHING|0.75|YES|3.5|YES|3.5|YES|#ffffff|YES|3.5|0.75|NO|48.0|YES|5.5|0.75|NO|YES|7.25|0.75|YES|YES|0.75|1.25|36.0|4.0|1.0|MITER|BRICK_RED|YES|4.0|1.0|YES|0.0|0.0|MODE1|BRICK_RED|A|16.0|12.0|12.0|2.0|1.0|QUOIN
8|150BLKHD|20210606122102|Int-Ext|Front|150.0|80.0|5.5|1.5|16.0|Left|0.0|2|1.5|1|1.5|NO|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|Outside Corner|90.0|1.5|1|California|Stud Depth|YES|YES|0.4375|FLUSH|YES|0.25|0.0|MITER|YES|0.5|NO|YES|0.0|0.0|0.0|0.0|0.0|OSB|HARDI_CM_HM|WALLGYPSUM|PFG|YES|NO|NO|NO|NO|0.5|WALLGYPSUM|NO|0.4375|FLUSH|OSB|HDU8|0.0|SB78-24|24.0|BOTH|FRAMING|Center|YES|1|48.0|ON SHEATHING|0.75|YES|3.5|YES|3.5|YES|#ffffff|YES|3.5|0.75|NO|48.0|YES|5.5|0.75|NO|YES|7.25|0.75|YES|YES|0.75|1.25|36.0|4.0|1.0|MITER|BRICK_RED|YES|4.0|1.0|YES|0.0|0.0|MODE1|BRICK_RED|A|16.0|12.0|12.0|2.0|1.0|QUOIN
Notice how Iāve used the vertical bar to separate the values/parameters, any deliminator could be used but the vertical bar is not something one would use typically in any of the fields as values so it makes for a convenient choice.
This system works well enough for storing and retrieving the data however the huge downside is that it is an ordered array of values and if I add in a new parameter (somewhere in the middle) then it throws off previous versions of preset files (ie. no backward compatibility).
I need a better way or method of storing this data. It canāt be binary since it needs to be visible to the user but it needs to be either some sort of structure, hash or XML so that I can easily add additional parameters to the system when required.
Any suggestions?
Here is an interesting thread on the matter from a couple years back: