许可优化
许可优化
产品
产品
解决方案
解决方案
服务支持
服务支持
关于
关于
软件库
当前位置:服务支持 >  软件文章 >  Autodesk.Revit.UI.Selection命名空间详解

Autodesk.Revit.UI.Selection命名空间详解

阅读数 2
点赞 0
article_banner
public static IList<Element> GetManyRefByRectangle(UIDocument doc){    ReferenceArray ra = new ReferenceArray();    ISelectionFilter selFilter = new MassSelectionFilter();    IList<Element> eList = doc.Selection.PickElementsByRectangle(selFilter,         "Select multiple faces") as IList<Element>;    return eList;} public class MassSelectionFilter : ISelectionFilter{    public bool AllowElement(Element element)    {        if (element.Category.Name == "Mass")        {            return true;        }        return false;    }     public bool AllowReference(Reference refer, XYZ point)    {        return false;    }}

Selection是一个非常常用的功能,码一段带选择过滤器的框选,效果是直接无视非指定 类  型。

Methods


NameDescription
DisposeReleases all resources used by the Selection/释放内存。
GetElementIdsReturns the ids of the elements that are currently selected. 选择得到ElementId。
PickBox(PickBoxStyle)Invokes a general purpose two-click editor that lets the user to specify a rectangular area on the screen.两种框选类型。
PickBox(PickBoxStyle, String)Invokes a general purpose two-click editor that lets the user to specify a rectangular area on the screen.在左下角增加提示。
PickElementsByRectangle()(String)(ISelectionFilter)(ISelectionFilter, String)Prompts the user to select multiple elements by drawing a rectangle.
PickObject(ObjectType)Prompts the user to select one object.
PickObject(ObjectType, ISelectionFilter)Prompts the user to select one object which passes a custom filter.
PickObject(ObjectType, String)Prompts the user to select one object while showing a custom status prompt string.
PickObject(ObjectType, ISelectionFilter, String)Prompts the user to select one object which passes a custom filter while showing a custom status prompt string.
PickObjects(ObjectType)Prompts the user to select multiple objects.
PickObjects(ObjectType, ISelectionFilter)Prompts the user to select multiple objects which pass a customer filter.
PickObjects(ObjectType, String)Prompts the user to select multiple objects while showing a custom status prompt string.
PickObjects(ObjectType, ISelectionFilter, String)Prompts the user to select multiple objects which pass a custom filter while showing a custom status prompt string.
PickObjects(ObjectType, ISelectionFilter, String, IList<(Of <<'(Reference>)>>))Prompts the user to select multiple objects which pass a custom filter while showing a custom status prompt string. A preselected set of objects may be supplied and will be selected at the start of the selection.
Public methodPickPoint()()()()Prompts the user to pick a point on the active work plane.
Public methodPickPoint(String)Prompts the user to pick a point on the active work plane while showing a custom status prompt string.
Public methodPickPoint(ObjectSnapTypes)Prompts the user to pick a point on the active work plane using specified snap settings.
Public methodPickPoint(ObjectSnapTypes, String)Prompts the user to pick a point on the active work plane using specified snap settings while showing a custom status prompt string.
Public methodSetElementIdsSelects the elements.高亮选中状态

Properties


NameDescription
Public propertyIsValidObjectSpecifies whether the .NET object represents a valid Revit entity.


免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删


相关文章
QR Code
微信扫一扫,欢迎咨询~
customer

online

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 board-phone 155-2731-8020
close1
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

姓名不为空

姓名不为空
手机不正确

手机不正确

手机不正确
公司不为空

公司不为空

公司不为空