Determining if a Family was created using Wall, Floor, Face, Ceiling or Roof based templates

By Saikat Bhattacharya

Using the Revit API, we can determine if a family was created using a Wall, Floor, Face, Ceiling or Roof based template. This is particularly helpful in case of, say, a generic mass family which can be created with any of the specific templates – Wall, Face, Floor, Ceiling, Roof based etc.

The solution is to access the Family Document –> Owner Family –> Host parameter, to get this information. This parameter value is stored as an integer value and the integer values imply the following about the templates (hosting behavior): 

Wall based – 1

Floor based – 2

Ceiling based – 3

Roof based – 4

Face based – 5

The families created using line and pattern based templates, however return integer value of 0 and cannot be determined using this method.


Comments

4 responses to “Determining if a Family was created using Wall, Floor, Face, Ceiling or Roof based templates”

  1. Mallikarjuna Avatar
    Mallikarjuna

    Dear sir,
    I want to add image or icon in Revit 3D view through programmatically in C#.net
    Please help me.
    Thankyou,
    Mallikarjuna

  2. Saikat Bhattacharya Avatar
    Saikat Bhattacharya

    Hi Mallikarjuna
    It does not seem like we can add image in a 3D view in Revit using the Revit User Interface itself. The image button appears disabled when the active view is a 3D view. Similarly, I dont think it will be possible to insert an Image in a 3D view using the API either. If UI does not support it, in most cases, API will not be able to perform the same task either.
    cheers
    Saikat

  3. Poorna Kumar.R Avatar
    Poorna Kumar.R

    Dear Sir,
    I want to apply tiles concept in 3d view through programmaticlly in C#.net is it possible or not ?
    Please help me
    Thanks & Regards
    Poorna kumar.R

  4. phil.mcracken@gmail.com Avatar
    phil.mcracken@gmail.com

    revit is being closed in 2020 we are no longer operating. Sry kumar

Leave a Reply to Poorna Kumar.RCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading