zoukankan      html  css  js  c++  java
  • revit二次开发之七 Revit隔离与隐藏

    Revit中经常出现隔离和隐藏对象,通过API如何实现这些功能呢?主要用到View中的几个关键函数

    一、隔离元素

    1、一个隔离多个类别

    public void IsolateCategoriesTemporary(ICollection<ElementId> elementIds)

    2、一次隔离一个类别

    public void IsolateCategoryTemporary(ElementId elementId)

    3、一次隔离多个元素

    public void IsolateElementsTemporary(ICollection<ElementId> elementIds)

    4、一次隔离一个元素

    public void IsolateElementTemporary(ElementId elementId)

    二、隐藏元素

    1、隐藏多个类别

    public void HideCategoriesTemporary(ICollection<ElementId> elementIds)

    2、隐藏一个类别

    public void HideCategoryTemporary(ElementId elementId)

    3、隐藏多个元素

    public void HideElementsTemporary(ICollection<ElementId> elementIdSet)

    4、隐藏一个元素

    public void HideElementTemporary(ElementId elementId)

    三、判断是否存在隐藏和隔离

       通过调用以下函数,判断当前视图中,是否有隐藏和隔离对象,假如为true,则说明存在隔离和隐藏对象,假如为false则不存在

    public bool IsTemporaryHideIsolateActive()

    四、取消隐藏和隔离

       调用以下函数,实现对隔离和隐藏对象的处理

    public void DisableTemporaryViewMode(TemporaryViewMode mode)

    TemporaryViewMode是一个枚举,其枚举的参数如下:

    成员表述
    RevealHiddenElements The view is in reveal hidden elements mode
    TemporaryHideIsolate 视图是临时隐藏和隔离模式
    WorksharingDisplay The view is in one of the worksharing display modes
    TemporaryViewProperties The view is in the selected View Properties applied temporarily.
    Raytrace The view is in the mode that shows the model in interactive raytracing
    ExplodedView The view is in the mode that shows the model in exploded view and allows user changes/configurations
    RevealConstraints The view is in the mode that reveals constraints between elements in the model.
    PreviewFamilyVisibility The view is in the mode that shows visibility settings applied in the environment of a family document.
  • 相关阅读:
    一个万能的工具包下载网站
    Keras框架简介
    发现了一个非常棒的pyqt5的例子集
    人脸识别常用数据集大全(12/20更新)
    用 opencv和numpy进行图片和字符串互转,并保存至 json
    机器学习中的范数规则化-L0,L1和L2范式(转载)
    利用face_recognition库裁取人脸
    一招解决C盘空间不足,再也不怕硬盘爆满!
    【LeetCode】394.字符串解码(辅助栈、递归、详细图解)
    程序员那些事儿:女婿程序员
  • 原文地址:https://www.cnblogs.com/minhost/p/6868021.html
Copyright © 2011-2022 走看看