本文整理汇总了C#中View.SetVisibility方法的典型用法代码示例。如果您正苦于以下问题:C# View.SetVisibility方法的具体用法?C# View.SetVisibility怎么用?C# View.SetVisibility使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View
的用法示例。
在下文中一共展示了View.SetVisibility方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HideLightingFixtureHosts
/// <summary>
/// Hide the LightingFixtures category
/// Hosts subcategory in the given view, cf.
/// http://forums.autodesk.com/t5/revit-api/how-to-get-image-of-a-family-model-without-showing-host-element/td-p/5526085
/// http://forums.autodesk.com/t5/revit-api/how-to-change-visibility-setting/td-p/5526076
/// http://forums.autodesk.com/t5/revit-api/how-to-get-family-model-image/td-p/5494839
/// </summary>
void HideLightingFixtureHosts( View view )
{
Document doc = view.Document;
Categories categories = doc.Settings.Categories;
Category catLightingFixtures
= categories.get_Item(
BuiltInCategory.OST_LightingFixtures );
CategoryNameMap subcats
= catLightingFixtures.SubCategories;
Category catHosts = subcats.get_Item( "Hosts" );
view.SetVisibility( catHosts, false );
}