Several people have developed scripts to render a mental model diagram in a browser, based on data formatted in a spreadsheet. However, none of these scripts has been released to the public; all of them are internal to different organizations. I’m working on freeing some of them up, because their authors are certainly interested in releasing the code. But the organizations, understandably, want to mitigate risk.
In the meantime, I recently verified that the Python script I have made available still works under specific conditions.
- The most important condition I have heard about is that the current version of Microsoft Visio 2013 cannot open the XML file that the script generates. I haven’t been able to investigate this personally, but I have verified that Microsoft Visio 2003 will reliably open the XML file.
- The second most important condition is that you save your spreadsheet in the Microsoft Excel 97-2003 format .xls format. (The .xlsx format is XML, so probably I need to get the script updated to skip the translation-to-XML step, but what with everything else, I haven’t had time.)
- I have verified that this script works with the pre-3.0 versions of Python, but not the new 3.0 and higher versions. I used Python 2.7.
- You must have Pywin installed, in a version that matches the version of (pre-3.0) Python you installed.
- Certain characters like the single ellipses character or special single or double quote marks will cause the phrase “ERROR???” to show up in the box on the diagram instead. That’s such a helpful message, isn’t it? It’s another thing I need to get fixed.
- Oddly, with the updated script below, the thick black divider lines (both vertical and horizontal) get created as “pattern=none” lines. You’ll have to select them and re-set the format.
Here’s the Python script that I used to create the dog mental model diagram that I presented at The Fluxible conference in September 2014:
Download: makeMentalModelFromXLS_style.zip
If you wish to read detailed instructions, refer to this older post about my Python script.