cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Export Defaults

Export Defaults

I wish there were a simpler way to export defaults from one computer and import them on another. Right now with the current "method" I am stuck trawling the registry for them, exporting a key, and importing it on the other computer, and hoping I've found the right section. I wish there were an option to export a key automatically to be used on another Windows machine and easily transfer default settings.

21 Comments

From a conversation I had with @jeff.pek, (for Fusion 360) most of the defaults are tied to the .xml file:

"most of these options are saved in a file called NGlobalOptions.xml, in the directory %appdata%\Autodesk\Neutron Platform\Options\<autodeskUserId>"

I wonder if you could just copy/paste the file when you are done..

 

But, I agree, a mechanism should be in place to carry over settings from one seat to another. Just the other morning I was making a few tweaks on my office/home PC only to later realize I needed to do it over again on my work PC as well as laptop. Arrrggghh

 

If you're talking about Fusion, I'd think there would be a cloud solution for that, so all your settings and defaults travel with you wherever you log in

jeff.pek
Community Manager

@Steinwerks: What product is this?

 

As Seth mentions, Fusion handle this settings propagation automatically, by saving the NGlobalOptions.xml file in the Cloud, associated with your user id.

 

Jeff

@jeff.pek pretty sure @Steinwerks uses HSMXpress of HSMWorks.

Steinwerks
Mentor

@LibertyMachine While not directed at Fusion 360 for this idea, yes, I would LOVE to see a Cloud solution for defaults. Why it wasn't built in from the outset I will never know, because who wants to log into a different computer and have to reset their defaults that they used to create the projects they can access from anywhere in the first place? Smiley Frustrated

 

@jeff.pek This was directed more squarely at HSMWorks. Are you saying that Defaults already carry over from different computers? I have three that run Fusion on a regular basis and I swear I had to set them all, but that was some time ago.

 

@Laurens-3DTechDraw I did come to the forums initially using HSMXpress, but have been using HSMWorks Professional for over a year now. And now I know you're not following me on IG in return! Smiley Wink Don't you remember the thread on 3D pocketing from a few months back?

jeff.pek
Community Manager

@Steinwerks: Yes, Fusion should already do this.

 

I think it's a good idea for HSMWorks (and Inventor HSM) to do this too. It would require logging in to get that behavior. Hopefully the votes here will help us prioritize doing that.

 

Jeff

Steinwerks
Mentor

@jeff.pek I don't know if logging on is the best way to do this honestly. I'd be happy with a small .zip file with the appropriate registry key(s) or any other needed files. This would work with separate logins on the same PC as well since the defaults are user-specific without having to log into Autodesk each time.

 

But frankly any way to do this reliably would be welcome. Thanks for chiming in!

 

What do you think @al.whatmough?

@jeff.pek I hate the logging in we have to do for Inventor HSM already.

Sometimes it's away for months next time you do it 5 times a day.

So while I love the idea the implementation would need work.

jeff.pek
Community Manager

OK, I hear you guys -- was looking for something seamless and automatic -- a la Google. It sounds like if you had an easy way to get at the settings from one machine, and just "install" them onto another, you'd be happy. We'll give it some thought, and see how others chime in.

@jeff.pek I love seamless, but that is really hard to implement history has proven.Smiley Wink

ArjanDijk
Advisor

Hi @Steinwerks.

 

You are not the first with this idea. Some solutions/workarounds came up:

 @makko74 created a batch file

 

I created an Ilogic code that does about the same:

 

Steinwerks
Mentor

@ArjanDijk But these do not do the job for HSMWorks in SolidWorks 😉

George-Roberts
Collaborator

@Steinwerksfeel free to drop me a DM and I'll happily write you a small application to do do this F.O.C, would only take a couple of mins

George-Roberts
Collaborator

I've wanted to do this for a while, so I have created a basic tool for you. Thought i might as well attach it here as it could help a few others! The application can be downloaded from here: http://a360.co/2kvuX1x

 

It will be a basic exe file that will allow you to export, Import and clear Inventor HSM defaults as well as export and clear HSMWorks defaults (it exports a reg file, so you just run that to install on another machine).

 

For those of you that are interested, here is the code:

using System;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms;
using System.IO.Compression;

namespace HSMDefaultCopy
{
    public partial class Form1 : Form
    {
        public string appdata = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Autodesk\\Inventor HSM\\Defaults");

        public Form1()
        {
            InitializeComponent();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog george = new FolderBrowserDialog();
            DialogResult result = george.ShowDialog();
            if (result == DialogResult.OK)
            {
                MessageBox.Show(george.SelectedPath);
                string path = "\"" + george.SelectedPath + "\\HSMWorksDefaults.reg\"";
                if (System.IO.File.Exists(george.SelectedPath + "\\HSMWorksDefaults.reg")) { System.IO.File.Delete(george.SelectedPath + "\\HSMWorksDefaults.reg"); }
                string key = "\"" + @"HKEY_CURRENT_USER\SOFTWARE\HSMWorks\HSMWorks\defaults" + "\"";
                Process proc = new Process();
                try
                {
                    proc.StartInfo.FileName = "regedit.exe";
                    proc.StartInfo.UseShellExecute = false;
                    proc = Process.Start("regedit.exe", "/e " + path  + " " + key + "");
                    if (proc != null) proc.WaitForExit();
                }
                finally
                {
                    if (proc != null) proc.Dispose();
                }
                MessageBox.Show("The defaults have been exported. Please run the REG file on the desired computer to import");
            }
         }

        private void button4_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Are you sure you want to overwrite the defaults?", "Continue?", MessageBoxButtons.YesNo);
            if (dialogResult == DialogResult.Yes)
            {
                if (Directory.Exists(appdata))foreach (string file in System.IO.Directory.GetFiles(appdata))System.IO.File.Delete(file);
                OpenFileDialog george = new OpenFileDialog();
                george.Filter = "Zip Files (ZIP)|*.zip;"; DialogResult result = george.ShowDialog();
                if (result == DialogResult.OK)ZipFile.ExtractToDirectory(george.FileName, appdata);
            }

        }

        private void button3_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Are you sure you want to reset the defaults?", "Continue?", MessageBoxButtons.YesNo);
            if (dialogResult == DialogResult.Yes)
            {
                string key = "\"" + @"HKEY_CURRENT_USER\SOFTWARE\HSMWorks\HSMWorks\defaults" + "\"";
                Process proc = new Process();
                try
                {
                    proc.StartInfo.FileName = "regedit.exe";
                    proc.StartInfo.UseShellExecute = false;
                    proc = Process.Start("cmd", "/C reg delete " + key);
                    if (proc != null) proc.WaitForExit();
                }
                finally
                {
                    if (proc != null) proc.Dispose();
                }
                MessageBox.Show("defaults cleared!");
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog george = new FolderBrowserDialog();
            DialogResult result = george.ShowDialog();
            if (result == DialogResult.OK)
            {
                string copyPath = Path.Combine(Path.GetTempPath(),"HSMDefaults");
                if (Directory.Exists(copyPath))Directory.Delete(copyPath);
                if (File.Exists(Path.Combine(george.SelectedPath, "Inventor HSM Defaults.zip"))) File.Delete(Path.Combine(george.SelectedPath, "Inventor HSM Defaults.zip"));
                ZipFile.CreateFromDirectory(appdata, Path.Combine(george.SelectedPath,"Inventor HSM Defaults.zip"), CompressionLevel.Fastest, true);
                MessageBox.Show("Defaults have been exported to: " + Path.Combine(george.SelectedPath, "Inventor HSM Defaults.zip"));
            }
        }

        private void button5_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Are you sure you want to reset the defaults?", "Continue?", MessageBoxButtons.YesNo);
            if (dialogResult == DialogResult.Yes)
            {
                if (Directory.Exists(appdata))foreach (string file in System.IO.Directory.GetFiles(appdata))System.IO.File.Delete(file);
            }
                MessageBox.Show("Defaults cleared!");
            }
        }
    }

 

 

It's a bit untested, so let me know if it works and/or if you think anything else would be useful

 

P.s. I know the code is sloppy and uncommented, it's 2am so it's just a quick one!

 

jeff.pek
Community Manager

Nice work, George!

 

Of course, there's a risk this could break in future releases of the software.

But, hopefully we'll have implemented this idea by then...

 

Jeff

George-Roberts
Collaborator

Yep, I can always change the code as welll until it's implemented, doesn't take long 🙂

Steinwerks
Mentor

Wow that took me forever to get around back to this! I just exported my defaults and will now see how they work on the one in the shop. Thanks @George-Roberts! I'll report back shortly.

Steinwerks
Mentor
Well it seemed to work great. I'll keep things updated as I use the other install more. 👍
al.whatmough
Alumni
Status changed to: Under Review

Now that George works for Autodesk we should see if we can bring this into the software. 🙂

Steinwerks
Mentor

@al.whatmough

 

Any chance this can be stuck in the UI somewhere? Smiley Wink

jeff.pek
Community Manager

We've got the code, and really just need to expose it. Let's make a ticket on it and fit it in.

Shouldn't be a lot of work.

 

Jeff

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea