How to read Excel files with Grasshopper

A quick guide to reading Excel files into Grasshopper for Rhino.

1) Install the LunchBox plugin for Grasshopper

2) Open the Excel file you want to read, and minimise it to the taskbar.

3) In Grasshopper, find the component called Excel Reader. Add your worksheet, column and row values in numerical format. Set ‘read’ to true.

Hints and tips

  • The component is clever – you don’t need to ‘link’ the Excel file to GH – it just looks for anything you have open. This is apparently more computationally efficient.
  • If you want to read multiple columns at once, enter multiple columns using the ‘series’ component. The output is a data tree instead of a list.

  • Always use numbers to describe columns (A=1, B=2…) and worksheets (Sheet1 = 1, Sheet2 = 2…).

Using AutoHotKey for accelerated scrolling in Windows/Bootcamp

There exists already a third party driver for BootCamp to improve upon the terrible drivers for the trackpad in Windows provided by Apple. It’s called Trackpad++ and attempts to provide some of the key trackpad actions that Mac users have come not to be able to live without.

But, to be honest, it’s not the solution I was looking for. The accelerated scrolling does not feel anywhere as natural as on a Mac (or even my Chromebook for that matter) and many of the better shortcuts are still absent. There are some settings available in Trackpad++ but they’re too simplistic and don’t allow the level of control I feel that I need. To top it off, the free version must be reinstalled every week (a passive-aggressive technique to encourage you to pay) and I can’t bring myself to actually pay for software that doesn’t actually solve the problem I’m trying to solve. Which is a shame really.

Trackpad++ is the only software out there that attempts to completely re-write the driver, but are there any other ways of getting the trackpad’s functionality back? I’ve been investigating using AutoHotKey to simply use Apple’s driver in Windows more effectively. Two features that I miss are accessing middle-click with the trackpad – something I addressed in this post – and the other is accelerated scrolling. This is where, if you scroll quickly, the speed of scrolling also increases, making it easier to navigate long pages without having to use the scroll bar. Done right, as on OSX and ChromeOS, it feels very natural and you don’t even realise that the scroll is accelerated. Get used to this and move back to Windows with its non-accelerated scrolling, and it feels like you’re browsing the web through treacle. This is very annoying!

With my perceived failure of Trackpad++ in solving this problem, my search has yielded an alternative, using AutoHotKey.

http://www.autohotkey.com/board/topic/48426-accelerated-scrolling-script/

Download the ZIP file and extract it. There is an EXE if you don’t have AutoHotKey installed – it’s as easy as running this EXE to get accelerated scrolling. There is also the AHK source file that you can run with AHK – this is the version I recommend if you want to tweak the code.

Thoughts? It still doesn’t feel amazing – the acceleration seems to kick in unpredictably, like only a small difference in scrolling speed will take you between half a page down, and to the bottom of the page. If using BootCamp, I recommend going into the mouse settings in the control panel, and setting the scroll wheel to scroll 1 line per notch, otherwise it feels far to fast. It also lacks the ‘momentum’ on ChromeOS/OSX (where the page keeps moving and gradually slows down when you have stopped scrolling).

But the fact that it is an AHK file means that I can play with it and improve it. Out the box, it is already quite acceptable, and I’m looking forward to finding the time to make it work even better. Added to the fact that AHK is in principle much safer than allowing someone’s third party drivers to worm its way into the core of your fragile Windows system, this is definitely the path I would sooner recommend.

A trackpad middle-click hack for Bootcamp/Windows using AutoHotKey

A great feature of both my Mac and my Chromebook is that middle-clicks are built into the trackpad by tapping with 3 or 4 fingers at once. But in Bootcamp (and with most Windows trackpads too) there is no equivalent to a triple-finger tap built into the drivers. Among many uses, the middle click is a dead easy way of closing tabs in Chrome without worrying about that fiddly tiny little close button – a feature I miss when using Windows.

To solve this, it’s AutoHotKey to the rescue! Credit to Lifehacker reader Nakul – I have a slightly modified the script to turn a double-right-click into a middle click. Note that this might not be suitable if you use applications that have specific actions for double-right-clicks, but for the vast majority of people this shouldn’t be an issue.

~RButton::
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < 500)
{
Click middle
}
Return

Simply install AutoHotKey, right click on the notification icon by the clock, click ‘Edit This Script’ and paste the above code. Save the notepad file and then reload the script.

The way that the script works is that, whenever the right mouse button is pressed, the code on the second line is called. If the code is called twice in a row, with 500ms between each call, then it simulates a middle-click. You can change the 500 value to a higher or lower value (in milliseconds) if you prefer.

To use the script with a trackpad, do a two-finger tap (as you would normally do for a right-click) twice quickly. It might make the right-click menu appear, but the second right-click should make it hide again.

How to install Ladybug for Grasshopper

Ladybug is a free plugin for Grasshopper that uses the EnergyPlus engine to provide a range of environmental calculations and visuals for input geometry. This guide will show you how to install Ladybug.

If you are looking to install the more recent Ladybug + Honeybee components for Grasshopper, this guide will help you too.

Check you have the right software

Firstly, you need Rhino 5. Rhino 4 won’t do! You can download a free trial here.

You also need Grasshopper, a free plugin for Rhino. Download the latest version here.

Then you need GHPython. Download it, and unzip it. In GH, open your components folder:

grasshopper special folders drop down menu

This should open a folder in a location like C:\Users\jramsden\AppData\Roaming\Grasshopper\Libraries. Paste GHPython.gha into this folder.

Install Ladybug

Visit the Ladybug page, take a read of it and have a look at the video. Then download the unlocked version from the page (or quicklink here). This should download a zip folder. Unzip this folder (the next step won’t work if you don’t unzip it first!).

Within the folder should be about 28 .ghuser files. Select them all and drag them directly into the GH window.

ladybug for grasshopper install components

Done! To double-check, go to your GH User Object folder under the Special Folders as above (e.g. C:UsersjramsdenAppDataRoamingGrasshopperUserObjects). The .ghuser folders should be in here.

Now a new tab should have appeared in your GH window called Ladybug.

ladybug ribbon icons grasshopper

There are 5 categories of components, labelled 0-4. In using Ladybug, these are run through roughly in order.

An introduction to EnergyPlus

EnergyPlus is a program for analysing spaces in buildings for various qualities such as occupant comfort and energy consumption. The program itself seems to have no GUI and interacts using command prompts and text input and output files, but it is intrinsically designed to interact with third party programs in all aspects including input, output and data manipulation. This makes it a great candidate for acting as a core for innovative building design methods. E+ is produced by the US Department of Energy and is free to use.

EnergyPlus website

The fact that EnergyPlus is not an all-in-one packaged solution in the way that IES gives it a steeper learning curve, and thus less desirable for newcomers, or people already used to such programs. However, after speaking with many people, it seems that once you are used to this program, you are well rewarded with a very powerful and flexible tool. This page is an attempt to figure out how to get started with E+ and how to get it doing something useful.

EnergyPlus is not an analysis solution in itself

If we use EnergyPlus as it is for our analysis, the only way to interact with it is to manually type the geometry data as a text file. The results we get are also a text file – a list of numbers. This is obviously not very good.

In reality, we use software to treat EnergyPlus as a core calculation engine, and wrap it with more user-friendly tools that help us to create models we want to analyse, and to make sense of the results.

Common plugins for EnergyPlus

I still haven’t tried any of these – but after some browsing, these are things I’d like to try… Note that this is also a growing list as I find more interesting stuff. More can be found on the E+ site.

OpenStudio seems to be an attempt at an all-in-one solution that handles geometry manipulation, results viewer and parametric design. It also has a link directly into SketchUp for geometry.

Legacy OpenStudio Plugin for SketchUp is the historic equivalent of the SketchUp plugin within OpenStudio.

DesignBuilder, like OpenStudio, attempts to be an all-in-one design environment. It seems to be built at least partly upon EnergyPlus. Not free and not cheap either!

More interesting plugins

GenOpt (Generic Optimization) is a platform-neutral optimisation tool that can interact with any text input/output files, of which EnergyPlus is one.

Ladybug is a GH plugin for EnergyPlus

Competition to EnergyPlus

Related programs which attempt to analyse comfort and energy performance at a building scale include:

IES

Green Building Studio / Ecotect

TAS

Misc (tidy up later)

List of building simulation conferences

A growing list of conferences to do with optimisation, structural/environmental and holistic building design and anything else of interest…

IBPSA Building Simulation Conference

International Building Performance Simulation Association. Started 1985, held every 2 years, 14 conferences held so far. Various international locations.

  • When: 2015
  • Where: Hyderabad, India

http://www.ibpsa.org/?page_id=44

http://www.bs2015.in/index.html

Conference papers/proceedings for IBPSA can be found at http://www.ibpsa.org/?page_id=349

IBPSA England – Building Simulation and Optimization

One event held so far, next in 2014. Abstract submission due this week, paper submission 16th Jan. Early bird tickets deadline 16th April.

  • When: 23-24 June 2013
  • Where: UCL, London

http://www.bso14.org/

IStructE – 16th Young Researchers Conference

Focused towards engineers in years 2 and 3 of their research, for those with less than 3 years’ research experience, and under 30 years old. 1st year students are not expected to present but are encouraged to attend. Free entry to registered delegates. Deadlines: 22nd Nov (1st year); 1st Nov (2/3 year)

  • When: 5 March 2014
  • Where: London

http://www.istructe.org/events-awards/conference-and-lectures/young-researchers-conference

GeCo In The Rockies

  • When: 22-26 Sept 2014
  • Where: Grand Junction, Colorado

http://www.gecointherockies.org/

Evo*

“The leading European event on bio-inspired computation” – since 1998

  • When: 23-25 April 2014
  • Where: Granada, Spain

Umbrella event for a number of conferences:

  • EuroGP – 17th International Conference on Genetic Programming
  • EvoCOP – 14th International Conference on Evolutionary Computation in Combinatorial Optimization
  • EvoBio – 12th International Conference on Evolutionary Computation, Machine Learning and Data Mining in Computational Biology
  • EvoMUSART – 3rd International Conference on evolutionary and biologically inspired music, sound, art and design
  • EvoApplications – 16th Annual Conference on the applications of evolutionary computation. Includes many sub-conferences, such as EvoComplex (evolutionary algorithms and complex systems), EvoHOT (bio-inspired heuristics for design automation)… see http://www.evostar.org/flyer/evo2014_granada_opt.pdf

 

http://www.evostar.org/

How to create and assign a new construction material in IES

Example: create a new window type and apply it to a window in an existing model

Create new construction

  • Go to Building Template Manager on the top bar
  • Click Constructions on the left
  • In the bottom, click Apache Constructions Database (small yellow button)
  • On the bottom, select the category, such as Glazed for adding a new window
  • Usually it’s easiest to create a new construction by duplicating an existing construction and then editing it. Right-click on a similar construction and select Duplicate Construction
  • On the new one (probably coloured purple), right click and select Edit construction
  • Create your construction in this window – each row in the table is one layer of material, outside to inside. Give it a name.
  • Press OK a couple of times when happy and return to the Building Template Manager. Save any changes if asked.
  • Under Select Construction on the right, for External Window, we should find our new window in the drop-down box. Select it.

Now, whenever we draw a new window, it will be assigned the properties of the window construction we just created.

If we already have a window drawn and we want to change its construction, we need to apply it.

Applying a construction to existing geometry

  • Go into Apache
  • Select your geometry which contains the windows you wish to edit – you can choose a wall or a whole room for example. This geometry should appear red when selected.
  • Click Assign Constructions (small yellow button, centre-top)
  • Under ‘Select construction category‘, select External glazing
  • Under ‘Assigned construction types’, we can select all windows made of one kind of glazing within the geometry we’ve selected. Choose the material the windows are made from at the moment.
  • Under ‘Possible replacement construction types‘ choose the material you wish to assign to.
  • Click Replace

To check, in the same window, if you select the new material under ‘assigned construction types’ the windows should now appear red in the preview.

Archive: How to install Windows 7 or Windows 8 from USB – clean install, no disc needed

This is an older guide I wrote a couple of years ago. Recently, the ISOs mentioned in the article have been removed and are now dead links. If you are still interested in installing or repairing Windows via USB, I have created a new guide, which you can read here.

This guide allows you to perform a completely fresh install of Windows 7 or Windows 8 on your PC. This guide: