How to add information in the file .SH3D

This topic has been viewed 3818 times and has 6 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
PBnetwork
Posts: 8
Joined: Wed Nov 10, 2010 5:45 pm
Country: AUBAGNE, FR

How to add information in the file .SH3D

Post by PBnetwork »

Hello everyone,

I need to save, for each of the furniture positioned on the 2D plan (an integer that will serve me as an identifier).
However I don't know where to change the code to save this information in the file SH3D, and then retrieve it.
Do you know if this is possible?
If yes, could you give me a track to do this?

Thank you for your feedback.

Pierrick.

[Note from moderator: please no translation. If you prefer to speak French, please post in the French section]
User avatar
hansmex
Posts: 4027
Joined: Sat Sep 26, 2009 11:36 am
Country: Netherlands

Re: How to add information in the file .SH3D / Ajouter une information dans le fichier .SH3D

Post by hansmex »

PB,

The only way, that I can think of, is to change the names of all the furniture elements you have inserted into your design.

However, the problem is to retrieve this information, as (most?) text editors cannot open the SH3D file.

Hans
Hans

new website - under constuction
hansdirkse.info
PBnetwork
Posts: 8
Joined: Wed Nov 10, 2010 5:45 pm
Country: AUBAGNE, FR

Re: How to add information in the file .SH3D / Ajouter une information dans le fichier .SH3D

Post by PBnetwork »

Thank you for your answer.
I think I haven't been enough precise.
In fact, I have to integrate SweetHome in a PHP application, when I insert a furniture in the plan, a popup is displayed, and the user has to fulfill some informations, when he sends the form, it saves these informations in a database, with a generated ID which correspond to the furniture in SweetHome, this is this ID that I need to retrieve and to save in the SH3D file...
User avatar
hansmex
Posts: 4027
Joined: Sat Sep 26, 2009 11:36 am
Country: Netherlands

Re: How to add information in the file .SH3D / Ajouter une information dans le fichier .SH3D

Post by hansmex »

PB,

This is beyond me. Check it with Emmanuel. Sounds as if you need to program this in Java. SH3D is open source, so the code is available. If you have trouble doing it yourself, I'm sure Emmanual can be convinced to do it for you, if the price is right. [:)]

Hans
Hans

new website - under constuction
hansdirkse.info
PBnetwork
Posts: 8
Joined: Wed Nov 10, 2010 5:45 pm
Country: AUBAGNE, FR

Re: How to add information in the file .SH3D / Ajouter une information dans le fichier .SH3D

Post by PBnetwork »

I know I have to program this in Java... but I don't know enough SH3D, that's why I need some help !
Anyway, thank you for having taken time to look at my problem.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: How to add information in the file .SH3D / Ajouter une information dans le fichier .SH3D

Post by Puybaret »

Maybe you could use the description property to store your information.
Until now, this modifiable property isn't used yet, so if you store your information in it, it won't appear in the user interface but will be saved.
Emmanuel Puybaret, Sweet Home 3D creator
PBnetwork
Posts: 8
Joined: Wed Nov 10, 2010 5:45 pm
Country: AUBAGNE, FR

Re: How to add information in the file .SH3D / Ajouter une information dans le fichier .SH3D

Post by PBnetwork »

Thank you very for your answer, it solved my problem.
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest