Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 11
Posts: 11   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2158 times and has 10 replies Next Thread
kingoftailor
Member




Joined: Jan 13, 2016
Post Count: 21
Status: Offline
Reply to this Post  Reply with Quote 
Autosave 3djs

Hello Emmanuel, Renaud,

I tried to set it to automatically save changes to the file when editing an empty sh3d file, but it returns an error 500.


I have added the following to the currently working planner:

var application = new SweetHome3DJSApplication(
{
readHomeURL: urlBase + "readHome.jsp?home=%s",
writeHomeEditsURL: urlBase + "writeHomeEdits.jsp",
closeHomeURL: urlBase + "closeEditedHome.jsp?id=%s",

furnitureCatalogURLs: [urlBase + "lib/resources/DefaultFurnitureCatalog.json"],
furnitureResourcesURLBase: urlBase,
texturesCatalogURLs: [urlBase + "/lib/resources/DefaultTexturesCatalog.json"],
texturesResourcesURLBase: urlBase,
userLanguage: "hu",
autoWriteDelay: 2000,
autoWriteTrackedStateChange: true,

});

What else should be set up for autosave to work?

Thanks, Gábor
[Jun 8, 2022, 11:28:29 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Autosave 3djs

Errors 500 should generate some logs on server side. Did you check them?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 11, 2022, 1:31:07 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
kingoftailor
Member




Joined: Jan 13, 2016
Post Count: 21
Status: Offline
Reply to this Post  Reply with Quote 
Re: Autosave 3djs

I resolved the problem.

Lack of write permission to folder caused the error.

I have only one problem. I can not able to delete the sh3d files from the apache homes folder.

I have got exception:
System.UnauthorizedAccessException: Access to the path 'xxxx.sh3d' is denied.

I don't think the apache server will allow deleting. All rights are granted to the iis user. Copying (creating) and modifying also works well.

Is there a method available in javascript to delete this file?
[Jun 14, 2022, 6:39:31 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Autosave 3djs

There's no JavaScript method to delete a file in client file system, and even more dangerous, on a remote server file system.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 15, 2022, 6:22:04 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Daniels118
Advanced Member
Member's Avatar

Italy
Joined: Nov 17, 2021
Post Count: 398
Status: Offline
Reply to this Post  Reply with Quote 
Re: Autosave 3djs

Maybe you still have wrong permissions, please post the output of 'ls -la'
on that directory and 'id httpd' (or whatever your apache user is).
----------------------------------------
[Edit 1 times, last edit by Daniels118 at Jun 16, 2022, 8:02:45 AM]
[Jun 16, 2022, 8:00:27 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Autosave 3djs

It would be nice to post the solution once you resolved your issue.
This forum isn’t here just to ask for help, but also to share solutions.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Aug 12, 2022, 5:45:30 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
adizanni
Newbie



France
Joined: Feb 6, 2024
Post Count: 19
Status: Offline
Reply to this Post  Reply with Quote 
Re: Autosave 3djs

Hello all,
I'm also stuck on the delete topic.
I've encapsulated the jsp solution into a local web solution (very much like the online version of SH3D. I managed to have all use case covered (edit, new, etc) except the delete. No significant log messages are raised in the Catalina logs.
Please help.
[Feb 15, 2024, 8:51:22 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Autosave 3djs

Do you mean that the method delete of java.io.File did not work? If yes, check the permissions on the SH3D files you manage on the server and maybe on the folder where you store them.

By the way, it would be nice to explain what you try to achieve.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Feb 15, 2024, 9:30:17 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
adizanni
Newbie



France
Joined: Feb 6, 2024
Post Count: 19
Status: Offline
Reply to this Post  Reply with Quote 
Re: Autosave 3djs

Hello thanks Emmanuel for the rapid answer,

Yes using the delete of java.io.File. I'm currently working in Eclipse on Windows and deploy Tomcat as a Target runtime, not clear which permission I have to look into. The properties of the Homes folder inside WebApp give only the possibility to set or unset "ReadOnly" and it is unset (I can create and edit existing files).

What I'm trying to do:

I'm the developer of this card : https://github.com/adizanni/floor3d-card in Home Assistant (home automation software), I'm trying to build a Home Assistant add-on to encapsulate SweetHome3D inside the Home Assistant frontend and also migrate my existing SweetHome3D plugin: https://github.com/adizanni/ExportToHASS to JSP.

By the way, I'm a big fan of your work....

Thanks in advance for the support.

Andrea
[Feb 15, 2024, 10:29:27 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
adizanni
Newbie



France
Joined: Feb 6, 2024
Post Count: 19
Status: Offline
Reply to this Post  Reply with Quote 
Re: Autosave 3djs

Hello, sorry if I made you lose time, but I discovered a bug in the JSP, now it is working as expected. Hope you did not lose time to look into it.
[Feb 15, 2024, 1:20:50 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 11   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved