Results 1 to 2 of 2

Thread: How to change visibility setting

  1. #1
    Member
    Join Date
    2010-05
    Posts
    13
    Login to Give a bone
    0

    Default How to change visibility setting

    This is a lighting fixture family file. How can I uncheck "HOST" using API?

    See the image attached2015-03-03_021018.jpg


    Thanks!

  2. #2
    Member
    Join Date
    2012-09
    Posts
    34
    Login to Give a bone
    0

    Default Re: How to change visibility setting

    You'll want to use the View3D.SetVisibility method.

    You'll need to pass it the Category object for your "Host" subcategory. You should be able to retrieve it by doing the following:

    Code:
    Category lightingFixtureCategory = doc.Settings.Categories.get_Item(BuiltInCategory.OST_LightingFixtures);
    
    Category hostSubCategory = (from Category cat in lightingFixtureCategory.SubCategories where cat.Name == "Host" select cat).First();
    With the category object retrieved, the SetVisibility call will look something like this:

    Code:
    view3D.SetVisibility(hostSubCategory, false);

Similar Threads

  1. Replies: 3
    Last Post: 2015-05-11, 06:13 PM
  2. Visibility while editing a family. Not followint the f/m/c detail setting
    By 3dway in forum Revit Architecture - Families
    Replies: 4
    Last Post: 2008-07-21, 02:42 PM
  3. Any Way to Change the Halftone Setting?
    By dgreen.49364 in forum Revit - Platform
    Replies: 3
    Last Post: 2008-03-25, 06:28 PM
  4. Visibility setting for topography border
    By norman.93625 in forum Revit Architecture - Wish List
    Replies: 3
    Last Post: 2007-03-08, 09:10 PM
  5. Discreet Materials Visibility Setting
    By narlee in forum Revit Architecture - General
    Replies: 4
    Last Post: 2005-06-10, 05:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •