Materials List: Where/how is it stored. Can it be exported?

This topic has been viewed 4108 times and has 1 replies
Thread status: Active
How can I do this? [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
User avatar
daytooner
Newbie
Posts: 6
Joined: Thu Mar 02, 2023 4:10 pm

Materials List: Where/how is it stored. Can it be exported?

Post by daytooner »

I have created a sh3d design of several rooms. I know that if I print out the design, I get a list of materials, along with aerial and 3D views. But, can I just get the materials list exported, preferably in some usable format such as a CSV file?

Also, where, and how, is it internally stored? I would like to know if modifications could be made (easily). I do have a few years of development experience in various forms.

What I eventually want is to compute total costs of materials, given cost/sq ft, or linear inches, or even pieces of furniture - chair, table, etc. Even better if that could be broken down by rooms. I know this is wishful thinking and should be posted in the wish list. But I thought I would just mention it here, now.

TIA

ken
User avatar
Puybaret
Expert
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Materials List: Where/how is it stored. Can it be exported?

Post by Puybaret »

If you're a developer, you shouldn't have problems to read the Home.xml entry stored in a SH3D file (a SH3D file is just a ZIP file), then keep the information you want by parsing it with your own parser or transform it with a XSLT file.
The DTD of Home.xml entry is available at https://www.sweethome3d.com/SweetHome3D.dtd and you'll see that furniture materials, textures and colors can be easily be identified. I would suggest to create a SH3D file using different type of colors / textures on walls and rooms, then look at its Home.xml entry to find the information you want.
Emmanuel Puybaret, Sweet Home 3D creator
Post Reply New Topic