Print at Jan 27, 2026, 12:25:25 PM
Posted by nvc60166 at Dec 6, 2023, 4:40:14 PM
Export project that was started while not being logged in (online)
Hi, so I discovered this nice software the other day and thinking I'd just do something very basic didn't bother signing up at first. But now I've done quite a bit of work in that browser window and would like to save it. But as I was not logged in, there is no option to save anything. Or is there a hidden export button???

I'm quite proficient with programming and JavaScript, so if anyone has an idea how I could pull the information from the code that would also work. I already poked around a bit and found that `this.application` seems to contain the entire state, but sadly it's not as simple as `JSON.stringify`ing it in the working browser window and `JSON.parse`ing it in the fresh one where I'm logged in now...

If anyone could help me that'd be amazing! <3

Posted by Puybaret at Dec 6, 2023, 6:32:07 PM
Re: Export project that was started while not being logged in (online)
I never thought about this but there must be a trick for sure. Let me think about it…
Meanwhile, I would recommend to take some screenshots of your design to keep a trace of your ideas, just in case your browser decides to reload the page by itself.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by Puybaret at Dec 6, 2023, 8:20:57 PM
Re: Export project that was started while not being logged in (online)
Open the JavaScript console of your browser and execute the following script:

new HomeRecorder().writeHome(application.getHomes()[0], "", {
homeSaved: function(home, blob) {
var downloadLink = document.createElement('a');
downloadLink.setAttribute("href", URL.createObjectURL(blob));
downloadLink.setAttribute("download", "home.sh3x");
document.body.appendChild(downloadLink);
downloadLink.click();
}
});

This will save the edited home in the file home.sh3x found in your downloads folder.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by Puybaret at Dec 6, 2023, 9:53:55 PM
Re: Export project that was started while not being logged in (online)
After doing some more tests, it looks like the previous script won’t work if you accessed the Online version from http: and not https:. If it’s the case, you’ll have to provide also an implementation of window.crypto.subltle.digest method.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by nvc60166 at Dec 7, 2023, 11:02:50 AM
Re: Export project that was started while not being logged in (online)
Wow, excellent solution! I pasted the snippet into the console and it worked beautifully. I 'downloaded' the file and was able to import it into my account, where it looks exactly as before. This was less hacky than I expected :D Thanks a lot Emmanuel for realising my feature request, especially so quickly! Great support! :)