Just wondering if it is possible to have grasshopper perform multiple calculations for changing materials? For example, if I want to analyze multiple glazing materials this would be useful. At the moment, I cannot figure out a way other than manually changing the material via the material component.


Thank you for any assistance!


Views: 2492

Reply to This

Replies to This Discussion

Probably the easiest way to do this would be to copy the entire grasshopper definition a couple times and give each one a different project name like which material name you are using. That way, when you run set the component to run (or write), a separate simulation will be run with each material selected and saved to unique project folders. If you connect all of them to a single 'true/false' component, then each simulation will be run in sequence. Below is a simplified version:


Steve / Jeff

Another approach is using list item 

Placing geometry into more than one material component. Then placing them into the list component. Before connecting to the list component you need to use the flip matrix component so that when you select the items all the geometries in that list stay intact as a group.

very nice Fabian, thanks.


hello fabian, jeff an all,

i was thinking about the same issue and was glad to find your solution because it´s exactly doing what i need.

i´ve build your definition with three variables for reflexion, i´ve connected it to a simulation i ran before which was working fine and now i get this error when i ran the diva simulation: Solution exception:Index was out of range. Must be non-negative and less than the size of the collection Parameter name: index 

do you have an idea what this causes?  

i´ll upload my files.

thanks, melanie


You are right Melanie, Fabian's definition strips away the path number (like 30023, etc), which the daylight component is using to reference the material library (we are developing a better way to reference geometry and materials in the daylight and thermal component). Following the logic of Fabian's definition, I rewrote so that the path number is preserved.

the slider should be an integer set to the maximum number of materials used. Zoom in on the component to add additional parameters for materials.


thank you jeff, i think this is working fine!

all the best, melanie

Hi, I tried this however got an error at Gate level  - Gate Index too high not sure why I can not have more that 0,1 outputs?

Also I got warning that my windows are not included within mode not sure how to solve that?

Any suggestion how to solve that,



Attached a working version:

The Gate component can allow as many items as you want. Just zoom in (a lot) and you'll see the + or - signs to add/delete options.

The Flip component was more than unnecessary. It failed the simulation.

The external facade was defined as adiabatic together with the other vertical elements. I separated so it can be external.

I grouped the changed items so you can follow.



Thank you Abraham ,

Selection with material works great ....but when I look at warning messages after simulation I can see that windows are not included. It seems that is some problem with unclosed space but have no idea why?

0. Error: Zone breps do not form a single closed volume (JoinBreps returned a non-solid object).
1. brep face edge curves could not be joined into one curve.

2. No windows were included. If this was not intended, make sure window 

3. IDF file writtebreps intersect zone breps and are coplanar with them.n: 


It is working now.

It was related to the split surface (wall and window, which is not needed for thermal but does for daylight) and the brep component location.


Thanks. However I noticed that right now we have two surfaces that overly....this means that we have a solid wall behind the window... I am a bit confused. 

I tried to check that and import file into TAS EDSL  using .idf import and I can not do it as have have some error with too many properties in theoretical glass....where I could check what material are imported with file? I thoght shall have only those few that I am using in my project...

I am trying to achieve one model that can do daylight and thermal simulation. So can try to find a good balance between max daylight with min lighting load and on other hand min cooling/heating load. If everything will go right would like to use Galapagos solver for that task. I am new to grasshopper just started last week and want to do step by step so can understand each process as separate right now. 

Reply to Discussion


© 2020   Created by jeff niemasz.   Powered by

Badges  |  Report an Issue  |  Terms of Service