{"id":635,"date":"2012-07-02T10:36:19","date_gmt":"2012-07-02T10:36:19","guid":{"rendered":"http:\/\/www.geoplanit.co.uk\/?p=635"},"modified":"2012-08-02T15:03:39","modified_gmt":"2012-08-02T15:03:39","slug":"cityengine-rule-creation-using-excel","status":"publish","type":"post","link":"https:\/\/www.geoplanit.co.uk\/?p=635","title":{"rendered":"CityEngine rule creation using Excel"},"content":{"rendered":"<p>Okay I&#8217;m a planner so I use Excel a lot especially for population statistics and analysis of landuses and planning standards. \u00a0 It would be nice to turn some of our planning standards tables into rule files for CityEngine to make. \u00a0For now though I&#8217;m trying out a number of workflows to test plot sizes.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-637\" title=\"cityengine_excel_rule\" src=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule.jpg?resize=614%2C278\" alt=\"\" width=\"614\" height=\"278\" srcset=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule.jpg?resize=1024%2C463&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule.jpg?resize=300%2C135&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule.jpg?w=1469&amp;ssl=1 1469w, https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule.jpg?w=1392 1392w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/a><\/p>\n<p>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\u00a0CONCATENATE function creates the correct syntax.<\/p>\n<p>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&#8217;ve choosen have come in well in CityEngine&#8230;.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule_results.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-636\" title=\"cityengine_excel_rule_results\" src=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule_results.jpg?resize=614%2C491\" alt=\"\" width=\"614\" height=\"491\" srcset=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule_results.jpg?resize=1024%2C819&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule_results.jpg?resize=300%2C240&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/07\/cityengine_excel_rule_results.jpg?w=1063&amp;ssl=1 1063w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/a><\/p>\n<p style=\"text-align: left;\">Why use this method? \u00a0Well I&#8217;m thinking of combining some of our data within CityEngine and this could be a handy way of doing it. \u00a0 Here I can relatively easily copy additional test areas once and excel, using formulas, can create the rest of the rule file.<\/p>\n<p style=\"text-align: left;\">I&#8217;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.<\/p>\n<p style=\"text-align: left;\"><strong>UPDATE(02\/08\/2012)\u00a0<a href=\"http:\/\/www.geoplanit.co.uk\/?p=693\">You can download the Macro-Enabled Spreadsheet from this post.<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Okay I&#8217;m a planner so I use Excel a lot especially for population statistics and analysis of landuses and planning standards. \u00a0 It would be nice to turn some of our planning standards tables into rule files for CityEngine to make. \u00a0For now though I&#8217;m trying out a number of workflows to test plot sizes. [&hellip;]<\/p>\n","protected":false},"author":161,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"tdm_status":"","tdm_grid_status":"","footnotes":""},"categories":[12,13,116,145,32,17,25,54,9],"tags":[],"class_list":["post-635","post","type-post","status-publish","format-standard","category-arcgis","category-arcmap","category-city-creation","category-cityengine","category-excel","category-maps","category-planning","category-tips","category-workflow"],"_links":{"self":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/users\/161"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=635"}],"version-history":[{"count":4,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/635\/revisions"}],"predecessor-version":[{"id":699,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/635\/revisions\/699"}],"wp:attachment":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}