How to add your knowledge

Parameter Values from Image

    Table of contents
    1. 1. Installation
    2. 2. Instructions for Use

    Version as of 01:12, 24 May 2013

    to this version.

    Return to Version archive.

    View current version

     

    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. For additional information, including troubleshooting, see the Buildz blog posts 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).  

    Installation

    You must download and run Project Vasari 2.1 at least once before running this installer.

    1. Download the zip file   from the Labs site
    2. Unzip the zip file and for Windows 7, extract here: C:\Users\username\AppData\Roaming\Autodesk\Vasari\Addins\TPversionnumber
    3. Run Vasari2.1_setup.exe.
    4. Keep all defaults.
    5. Run Project Vasari.
    Instructions for Use
    1. Navigate to C:\Users\username\AppData\Roaming\Autodesk\Vasari\Addins\TPversionnumber.
    2. Open bitMapDemo.rfa.
    3. Click Add-Ins tab>External Tools>Set Parameter Values from Image Data.
      The command accesses the image file bitMapDemo.rfa_grayscale.bmp.
    4. For each panel of the divided surface, Vasari computes the grayscale value of the corresponding pixel in the image file (Red + Green + Blue divided by 3).
    5. The panel’s “Grayscale” parameter is set to this grayscale value.
    6. The panel’s geometry updates 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.