Re: Batch files for loading plans

by okh » Sun Apr 23, 2017 10:17 am

..draw all 100 walls I'd like it if SweetHome 3D could read a file like...
Interesting question, nice idea. Short answer is, no, but ... thanks to SH3D .xml there are workarounds (for 100 walls, you may be better off doing it manually using CTRL-SHIFT-move with some template walls, though).

Long answer is, extract Home.xml from a simple .sh3d file and edit. The XML is nicely formatted and straightforward to read. For instance, a simple home with four walls (and corners) and one wall across, will have some introductory stuff and walls specified at the end:

Code: Select all

...snip...
<wall id='wall0' wallAtStart='wall3' wallAtEnd='wall1' xStart='0.0' yStart='0.0' xEnd='1000.0' yEnd='0.0' height='240.0' thickness='30.0' pattern='hatchUp'/>
<wall id='wall1' wallAtStart='wall0' wallAtEnd='wall2' xStart='1000.0' yStart='0.0' xEnd='1000.0' yEnd='800.0' height='240.0' thickness='30.0' pattern='hatchUp'/>
<wall id='wall2' wallAtStart='wall1' wallAtEnd='wall3' xStart='1000.0' yStart='800.0' xEnd='0.0' yEnd='800.00006' height='240.0' thickness='30.0' pattern='hatchUp'/>
<wall id='wall3' wallAtStart='wall2' wallAtEnd='wall0' xStart='0.0' yStart='800.0' xEnd='0.0' yEnd='0.0' height='240.0' thickness='30.0' pattern='hatchUp'/>
<wall id='wall4' xStart='0.0' yStart='300.0' xEnd='1000.0' yEnd='300.0' height='220.0' thickness='10.0' pattern='hatchUp'/>
...snip...

If this XML does not look frightening, you will probably also know what to do to batch import (use cm!). To be more specific, for instance like this, step by step.:This works (tried quick spreadsheet [:)] ), but getting hundreds of walls right (and possibly with rooms etc), will require some coffee.

ok