The Parameter Values from Image add-in is a tool for writing data from an image file to a curtain panel by pattern family in a divided surface.
Imagine you have a bitmap that is 12x12 pixels named yourFile.rfa_grayscale.bmp. You have a divided surface that is 12x12 cells in a file called yourFile.rfa. The panels in your divided surface contain a parameter called Grayscale, and the API will write a value from 0 (white) to 1 (black) based on the pixel values of the image.
NOTE: What you do with that parameter is up to you. There are blog posts on it here, here, here, and here. For those inclined to tinker with the code, the source has been included and it is also available in the Revit 2012 SDK. It is limited to only working in Mass family files (.rfa).
You must download and run Project Vasari 2.1 at least once before running this installer.
- Download the zip file from the Labs site.
- Unzip the zip file and extract here: For Windows 7: C:\Users\username\AppData\Roaming\Autodesk\Vasari\Addins\TPversionnumber
- Run Vasari2.1_setup.exe.
- Keep all defaults.
- Run Project Vasari.
Instructions for Use
- Navigate to C:\Users\username\AppData\Roaming\Autodesk\Vasari\Addins\TPversionnumber.
- Open bitMapDemo.rfa.
- Click Add-Ins tab>External Tools>Set Parameter Values from Image Data.
The command will open access the image file bitMapDemo.rfa_grayscale.bmp
- For each panel of the divided surface, Vasari will compute the grayscale value of the corresponding pixel in the image file (Red + Green + Blue divided by 3).
- The panel’s “Grayscale” parameter will be set to this grayscale value.
- The panel’s geometry will update based on relationships in the parameter’s definition driven by this parameter. Open and exit the panel geometry to see how it is constructed.
- Additional examples are provided in the “more examples” subfolder.
- IMPORTANT: the add-in is looking for a .bmp file that has exactly the same name as your .rfa file plus “_grayscale.bmp”and is in the same folder as the .rfa file.