Okay I’m a planner so I use Excel a lot especially for population statistics and analysis of landuses and planning standards.   It would be nice to turn some of our planning standards tables into rule files for CityEngine to make.  For now though I’m trying out a number of workflows to test plot sizes.

What I wanted to do was choose the colours of my plots based on its area, this method allows me to pick a cell fill colour in Excel and run a macro over it to create the hex code which using the magic of CONCATENATE function creates the correct syntax.

The Excel sheet you see above can then be copied and pasted into a CGA rule file in CityEngine, the results below show that the colours I’ve choosen have come in well in CityEngine….

Why use this method?  Well I’m thinking of combining some of our data within CityEngine and this could be a handy way of doing it.   Here I can relatively easily copy additional test areas once and excel, using formulas, can create the rest of the rule file.

I’ll be posting a test Excel sheet soon here, as well as the macro code for take a cell fill colour and creating the hexadecimal code from it.

UPDATE(02/08/2012) You can download the Macro-Enabled Spreadsheet from this post.

2 Comments

  1. Hey I’m a PhD student studying VR and 3D modeling and I came through you post today. How do you import Excel file? CE doesn’t support importing Excel. Did you use Python?

    • Hi, this post talks about using excel to construct the plain text CGA rule files. All I do is cut and paste the text into the rule file. As to reading excel files my guess would be to use python to read a plain text file like a csv file… Hope this helps.

Comments are closed.