Can you modify an existing .SH3D model with the API?

This topic has been viewed 5365 times and has 2 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
SystemOfAFrown
Posts: 2
Joined: Sat Jan 15, 2022 7:40 pm
Country: United States

Can you modify an existing .SH3D model with the API?

Post by SystemOfAFrown »

Hello,

I was wondering if you can use either the Java or Javascript API's to modify an existing .sh3d file.model.

The best example I can give for this, is having the user enter their preferences for color and design tastes on a webpage; and then the API code would change the colors of the walls; within the floorplan for example.

It would be the same manufactured home each time, so it would be from the same template .sh3d file.

Thank you for your time.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Can you modify an existing .SH3D model with the API?

Post by Puybaret »

Even if it would work quite differently in Java and JavaScript, both APIs let you open a SH3D file, change its content and save the result.
In Java, you can program an application which calls [font=courier new]readHome[/font] and [font=courier new]writeHome[/font] of HomeFileRecorder class with modifications of the read home meanwhile.
Emmanuel Puybaret, Sweet Home 3D creator
SystemOfAFrown
Posts: 2
Joined: Sat Jan 15, 2022 7:40 pm
Country: United States

Re: Can you modify an existing .SH3D model with the API?

Post by SystemOfAFrown »

Are there any good tutorials or documentation on how to get started with this class and the overall workflow for the Java API?
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest