Using Presets

To save the Customizer settings associated with a design, you should create a Preset. By using Presets, you don’t have to recreate your settings each time you want to modify a design or create a new design that is closely related to one you already have.

You manage Presets with the buttons in the upper right corner of the keyguard designer web app – at the top of the Customizer pane (surrounded in red  below):

Here’s what the buttons look like when you’ve made a change to the currently selected Preset:

  • “+” – you use the plus button to define a new Preset based on the current Preset
  • “-” – you use the minus button to delete the currently selected Preset.  Note that you can’t delete the build-in “design default values” Preset.
  • “Save preset “- this button saves the changes you’ve made to the current preset
  • “Reset” – changes all options back to the last saved version of the current preset
  • “open” – this button with yellow, file folder is used to load a file containing one or more Presets.  The presets in the file will replace (not delete) the Presets in the pull-down list.
  • “open +” – this button with a yellow, file folder and a plus, will append all the Presets in the file you choose to the current list of Presets.
  • “export” – this button with a hard disk icon and red down arrow will export the current Preset to a JSON file.  That file can then be imported directly into the keyguard designer web app at a later date or by a different person.

Creating a New Design/Preset

When you press the “+” (new Preset) button you’ll be asked to give your new design a name.  The new preset will “inherit” the settings associated with the currently selected Preset.  If you base your new design on the default design values Preset, you’ll see a pop-up like this appear:

Give your design a name and press the OK button.  Your design will be added to the end of the Preset pull-down list or where it falls in aphabetical order in the list depending on how you’ve set the “Preset list order” setting on the General tab:

If you base your new design on an existing design in the Preset pull-down list, you’ll see a pop-up like this appear with the name of the current Preset in the Name box:

That makes it easy for you to give the new design a related name like “Ensio #2”.  The new design will automatically pick up all the settings associated with the “Ensio” design.

Saving a New Design/Preset

As soon as you make a change to the default design, an asterisk will appear to the right of the the pull-down list of Presets:

The asterisk indicates that the current customization settings are different from the last saved version of this Preset.  Note that changing that option back to its original value will make the asterisk disappear.

This is where you provide a name for your preset (OpenSCAD is calling this a “parameter set”).  We recommend that you use the ID of your keyguard as the name of the preset.

Where are all the settings/parameters/presets saved?

The keyguard designer web app saves all the customization options for a design in a JSON file.  The file will be created by the keyguard designer the first time you save a preset.  The file is created in the same folder as keyguard.scad file.  The JSON file will be given the same name (including version number) of the keyguard.scad program you are running and will put .json on the end of the name:

When the web app launches, it looks for a file in the same folder with the name of the keyguard designer program it is running and a file type of .json.  When you download a new version of the keyguard designer program, the web app will automatically update the name of the JSON file to match.  None of your work will be lost.

Is every customization to a keyguard saved this way?

No – only the customizations to your design that you make via the Customizer pane are saved.  If your keyguard design involves special instructions that you put in the openings_and_additions.txt file, those features are not saved along with the Customizer settings in the Preset.  You should ensure that any modifications you make to that file are copied to a folder for safekeeping.  We recommend that you create a folder for every keyguard you design and place the openings_and_additions.txt file in that folder.

You should periodically save the current .json file some place safe, just in case it gets deleted accidentally or you change a preset and save it when you intended to create a new preset instead.  This file can represent lots of work that can be a pain and error-prone to recreate.