As they say: "no good deed goes unpunished!"
After reading my last post about saving your custom settings from getting clobbered by updates, I decided to do something about it. Rather than leaving preferences, custom symbols and so forth in a subfolder of SketchUp's Plugins folder (where DPLineStyler lives), I decided to move them out to a different folder, where SketchUp couldn't overwrite it. I chose a location in the same enclosing directory that SketchUp uses, and in fact where most other apps keep their preferences.
On a Mac, this folder is <Mac's Name>/<Disk Name>/Users/<User name>/Library/Application Support/DPPlugins/DPLineStyler.
On Windows, the folder is something like 'This PC /Local Disk (C:)/Users/<User name>/AppData/Roaming/DPPlugins/DPLineStyler.
I updated DPLineStyler to use this new "safe" location for its preferences file, the collection of custom line symbols, and the set of glyphs (characters) used for making letter symbols. The prefs file is named "Styles.txt" and the symbols are a collection of small .skp files inside a folder called "symbols." The glyphs (also small .skp files) all live in a subfolder of the symbols folder, called "glyphs."
Now all I had to do was to move all this stuff out of "~/SketchUp/Plugins/dp_line_styler" and into my DPPlugins directory. Should be easy, no?
No.
On my Mac, it worked just fine. On my Windows 10 test machine, it also worked fine. I submitted DPLS version 1.1 and it was quickly approved and posted on the Extension Warehouse. I also posted it on the Sketchucation Plugin Store.
It didn't take long before one of my loyal customers (using Windows 10) reported a bug with the new version. When he went to create a symbol, nothing happened. With a bit of back and forth, we managed to figure out that my prefs stuff never got moved to the new folder. The folders were there, alright, but there was nothing in them. I helped him move the stuff manually and his copy of DPLS worked just fine after that.
So I changed the way I was moving the files (in coding there's always another way to do something) and updated DPLS to version 1.1.1. Tested fine again. Quickly approved again. And another Win10 user reported the same bug, again. Sigh.
So I made yet another update to DPLS, version 1.1.2 this time. Hopefully, this fixes the issue once and for all. I sure hope so! It's available on Sketchucation now, and should be up on the EW any day now.
Meanwhile, if you are seeing this bug and don't mind getting your hands a bit dirty fixing it, here's what to do:
How to Manually Move DPLineStyler preferences files (Windows 10):
1. Look for the directory (folder) named something like 'This PC / Local Disk (C:) / Users / <Name> / AppData / Roaming’ (<Name> is your user name on this computer.) 2. Inside that folder, there should be a folder named ‘DPPlugins’ and inside that folder a folder named ‘DPLineStyler.’ Inside of this folder should be a file named 'styles.txt' and a folder called 'symbols.' Are they there? If so, proceed as follows:
3. Open the (empty) symbols folder - you will need this folder later.
4. Open a new window to the folder: 'This PC / Local Disk (C:) / Users / <Name> / AppData / Roaming / sketchup / sketchup 2020 / sketchup / plugins / dp_line_styler / symbols
5. You should see some small SketchUp files in there. Also, another folder called ‘glyphs’ that also contains (many) small SketchUp files.
6. Drag (or copy/paste) the entire contents of the symbols folder (including the glyphs folder) to the empty symbols folder.
DPLineStyler should work normally now. You shouldn't even have to restart SketchUp!
As always, thanks for using DPLineStyler, and special thanks to those who give me bug reports and feedback, so I can keep making DPLineStyler better!
Comments