These exercises just reminded me of organ pipes. Then there is a secondary allusion to the monkey that generates heart-rending melodies by the turn of a handle. If Revit is the organ then Excel would be the grinder.
Start with a generic model. I have a starter file that I often use as a springboard. It's a rectangular extrusion with 5 parameters already set up. Took just a couple of minutes to adjust this, make Height & Depth instance parameters, rename Thickness to "Base Offset" (also instance) , leave Width & Material as they are. Thickness was a parameter with nothing to do in my seed family, so I had to draw a reference plane, stretch down the extrusion and lock it, place a dimension, assign it to Thickness (Renamed to Base Offset). Done.
Load this family into another new generic model. Create a whole series of parallel reference planes and use a parameter called "Spacing" to control just that. Lock one instance of the nested family to each of these. Finally, link the type parameters to equivalents in the host family. Now load into project.
You might want to try adjusting this family manually. It will help to give a sense of how helpful the Excel link can be.
I am using Revit Excel Link (REL) from within Family Editor. Once again my aim is to randomise the Instance Parameters. REL will export these parameters to an excel sheet, then I set up formulas using the Randbetween function. There are 3 columns and each of them is randomised separately. The formulas for the 3 columns are very similar, but reference different fixed cell locations. These fixed locations contain values that I can vary in order to fine tune the effect.
I've used colour coding to make this clearer. The Height is coded pink. I am generating values that range between 1500 and 2200 in 100mm steps. So the formula refers to 4 locations: a start value (1500) an increment (100) and limit values for the increment multiplier (1 & 7) The Randbetween function generates random values between 1 & 7, multiplies these by 100 and adds the result to 1500.
Load these values back into Revit check what it looks like, then adjust the start values and increments and reload. It took me 3 or 4 iterations of this to get the right balance between height and base offset. Just to be clear, you need 2 worksheets in Excel. One is the export from Revit, the other is where the formulas reside. The columns are linked together so that the Randomly generated data will replace the original values imported from Revit.
Then it's all down to rolling the dice. Take a look, see what that suggests: play with Revit a bit; roll the dice again. Here's a GIF to convey the impression of rolling dice.
Now for some variations that are pure Revit. Let's see what happens if we tweak a few type parameters, vary the width and spacing for example.
Here's a version that I quite like. Be prepared for some happy accidents.
Oops, that wasn't quite what I intended, but it opens up another avenue for exploration.
Roll the dice again. Maybe a different view will trigger off some ideas, or perhaps an interlude of self-indulgent image processing. I deserve a break from all this formula stuff anyway.
What if we stretch the spacing out really wide ?
And it's fun to play with materials. For example reflective materials work much better when the slats are more like boxes. Timber is good when they are tall and spiky. I haven't even begun to contemplate metal sections painted in a range of primary colours. That will have to be another post. Too much to think about.
Chrome is interesting though. Better with a dark background. Hardwood perhaps. I need to put some stuff in the model to show in the reflections, which turn out to suffer from appropriately random distortions. That's nice. Had to put Florence in there to indicate that whimsy is coming into play. She's my signal that you are entering pumkinland. Remember to go into render properties of an RPC object and turn on Reflections.
I think the interesting part of all this is the flip-flop between Revit and Excel. Decide on your parameters, some instance, some type. Manipulate the instance parameters from Excel, adjust the type parameters within Revit. Makes for an interesting game and generates a lot of different variations very quickly.
Start with a generic model. I have a starter file that I often use as a springboard. It's a rectangular extrusion with 5 parameters already set up. Took just a couple of minutes to adjust this, make Height & Depth instance parameters, rename Thickness to "Base Offset" (also instance) , leave Width & Material as they are. Thickness was a parameter with nothing to do in my seed family, so I had to draw a reference plane, stretch down the extrusion and lock it, place a dimension, assign it to Thickness (Renamed to Base Offset). Done.
Load this family into another new generic model. Create a whole series of parallel reference planes and use a parameter called "Spacing" to control just that. Lock one instance of the nested family to each of these. Finally, link the type parameters to equivalents in the host family. Now load into project.
You might want to try adjusting this family manually. It will help to give a sense of how helpful the Excel link can be.
I am using Revit Excel Link (REL) from within Family Editor. Once again my aim is to randomise the Instance Parameters. REL will export these parameters to an excel sheet, then I set up formulas using the Randbetween function. There are 3 columns and each of them is randomised separately. The formulas for the 3 columns are very similar, but reference different fixed cell locations. These fixed locations contain values that I can vary in order to fine tune the effect.
I've used colour coding to make this clearer. The Height is coded pink. I am generating values that range between 1500 and 2200 in 100mm steps. So the formula refers to 4 locations: a start value (1500) an increment (100) and limit values for the increment multiplier (1 & 7) The Randbetween function generates random values between 1 & 7, multiplies these by 100 and adds the result to 1500.
Load these values back into Revit check what it looks like, then adjust the start values and increments and reload. It took me 3 or 4 iterations of this to get the right balance between height and base offset. Just to be clear, you need 2 worksheets in Excel. One is the export from Revit, the other is where the formulas reside. The columns are linked together so that the Randomly generated data will replace the original values imported from Revit.
Then it's all down to rolling the dice. Take a look, see what that suggests: play with Revit a bit; roll the dice again. Here's a GIF to convey the impression of rolling dice.
Now for some variations that are pure Revit. Let's see what happens if we tweak a few type parameters, vary the width and spacing for example.
Here's a version that I quite like. Be prepared for some happy accidents.
Oops, that wasn't quite what I intended, but it opens up another avenue for exploration.
Roll the dice again. Maybe a different view will trigger off some ideas, or perhaps an interlude of self-indulgent image processing. I deserve a break from all this formula stuff anyway.
What if we stretch the spacing out really wide ?
And it's fun to play with materials. For example reflective materials work much better when the slats are more like boxes. Timber is good when they are tall and spiky. I haven't even begun to contemplate metal sections painted in a range of primary colours. That will have to be another post. Too much to think about.
Chrome is interesting though. Better with a dark background. Hardwood perhaps. I need to put some stuff in the model to show in the reflections, which turn out to suffer from appropriately random distortions. That's nice. Had to put Florence in there to indicate that whimsy is coming into play. She's my signal that you are entering pumkinland. Remember to go into render properties of an RPC object and turn on Reflections.
I think the interesting part of all this is the flip-flop between Revit and Excel. Decide on your parameters, some instance, some type. Manipulate the instance parameters from Excel, adjust the type parameters within Revit. Makes for an interesting game and generates a lot of different variations very quickly.
You had me until:
ReplyDelete"Finally, link the type parameters to equivalents in the host family."
What does that mean? How do you do that?
Basically you create parameters in the Host family with the same names as the ones in the nested family. Then you can link these together, so that the Host family controls the nested family.
ReplyDeleteI'll try to do a little post soon to explain this more clearly.