sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Where to Store User Settings?

    Scheduled Pinned Locked Moved Developers' Forum
    29 Posts 7 Posters 1.8k Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dan RathbunD Offline
      Dan Rathbun
      last edited by

      OH.. sorry Jim... I missed the real question in your query.

      You want to use YOUR OWN company name folder "Jim Foltz" instead of the "Google" dir...
      .. and then whatever subfolders you wish to organize below that.

      Well YES, IMHO... no problem there. Keep it separate and protected from inadvertant cleansing (such as when someone tries to cleanup their system for a "clean" reinstall of Sketchup.)

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        Here's an article with some more specific info for working with several recent versions of Windows.

        What’s the Recommended Location for Application Files?

        The article only confirms what has already been said here: %APPDATA% is the correct folder (or better to use your own sub-folder under %APPDATA%.)

        Hi

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          But roaming or local?

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by

            Why not always roaming? Is there a specific case for local?

            I might use local if the file(s) were for a license key tied to a specific machine. But otherwise, I can't think of a reason not to use roaming.

            Hi

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              Yea - I wasn't sure if roaming could be used if the user where not on a domain. (I don't have any experience with that kind of stuff...)

              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                ENV["APPDATA"] returns the PC User's 'Roaming' folder anyway... 😕

                TIG

                1 Reply Last reply Reply Quote 0
                • K Offline
                  kirill2008
                  last edited by

                  I think it is possible to store user settings right in *.skp file. Why not? AutoCAD stores a lot of settings (a plenty of settings) in *.dwg file for example.
                  I'm not sure about problems with such approach, but it works well for some of user settings. I use "Sketchup.active_model.set_attribute" to store user settings.
                  Ok, it's not ideal solution of course: it increases file size, I guess. And it does not fit for user settings, that have to be insensitive for *.skp file. And a lot of excess data will be attached to each *.skp file instead of single *.ini file.

                  1 Reply Last reply Reply Quote 0
                  • thomthomT Offline
                    thomthom
                    last edited by

                    @kirill2008 said:

                    I think it is possible to store user settings right in *.skp file. Why not? AutoCAD stores a lot of settings (a plenty of settings) in *.dwg file for example.
                    I'm not sure about problems with such approach, but it works well for some of user settings. I use "Sketchup.active_model.set_attribute" to store user settings.
                    Ok, it's not ideal solution of course: it increases file size, I guess. And it does not fit for user settings, that have to be insensitive for *.skp file. And a lot of excess data will be attached to each *.skp file instead of single *.ini file.

                    That would then not be User data - but Model data. Two very different things.

                    Thomas Thomassen — SketchUp Monkey & Coding addict
                    List of my plugins and link to the CookieWare fund

                    1 Reply Last reply Reply Quote 0
                    • TIGT Offline
                      TIG Moderator
                      last edited by

                      User data specific to Sketchup can be stored with Sketchup itself in the Registry [Plist on Mac] ?
                      Sketchup.write_default(section,variable{,optional_default}) Sketchup.read_default(section,variable,value)
                      You obviously need to 'compile' the value[s] to write and read back in specific ways.
                      If there are 'many things' to keep across sessions then a saving them into a Users/Name/AppData/Roaming/ Sketchup subfolder, inside a tool specific subfolder or ini file etc would also be possible - not sure about Mac alternative...

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • K Offline
                        kirill2008
                        last edited by

                        @thomthom said:

                        That would then not be User data - but Model data. Two very different things.

                        Looks like I interpreted thread subject in a context of my own thoughts 😳
                        I mean, I was going to suggest to use template for storing user settings data.
                        template.png
                        It is less elegant than just click "OK" button in "Settings" dialog of the plugin, of course 😄 But the user can save his own presets in template file, add description to it, then it will be possible to revert back to any previously saved configuration.

                        UPD.
                        The point is that I was thinking about abstract "application user" not the operating system user. Application means plugin here.
                        So I thought that application (plugin) usually runs "system wide" (not in "per user mode") and the problem is what is the best way to persist application settings (i.e. user preferences *application user here again).
                        Storing plugin settings right in document allows user preferences persistence across different machines and even across operating systems in theory 😉 (when I say "user" I mean plugin user). So user can take his *.skp file anywhere and continue working with it on any device that has SU and plugin 😄 and he does not have to care about configuring plugin again on each device.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 2 / 2
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement