There are a gazillion little "samples" of plugin functionality code that come in your box of Revit, mostly tools that demonstrate simple repeatable tasks that can be automated by an API developer. They live in the "tools and utilities" section of the installation dvd, and once deployed, live deep in a set of subfolders where it is cool and dry. Although meant for hardcore API developers to cut and paste and assemble other functionality, these little snippets of code can become useful applications in the Revit environment with little alteration. For me, the problem has been how to turn these snippets from unintelligible bits of code into a button I can push and watch wonderful things happen. I FINALLY figured out how to do this, using the freely available Visual Studio Express to compile the code, and would like to start sharing some of these little treasures with you all. However, tonight I'd like to just show you how to hook up one of these compiled bits of code. If I was a real developer, I would give you an installer and we'd all just call it a night. But I'm not, so we can do this old school.
Inverse Relationship: farther from target, smaller mullions

So I would need to change ECCount=2 to now say ECCount=3 , and the rest gets updated to 3
ECClassName3 = Revit.SDK.Samples.DistanceToPanels.CS.SetDistanceParam
ECAssembly3 = C:\Revit SDK 2010\DistanceToPanels.dll
ECDescription3 = Compute the distance from a selected object to all panels and store in a panel
Make a curtain panel by pattern with a length instance parameter "Distance", load it into a divided surface in a mass FAMILY (not an rvt). Select another family in the massing environment and push the magic button in the Add-Ins menu.
Caveat: I think this only works on rectangular panels. 


















