惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google Online Security Blog
Google Online Security Blog
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
V
V2EX
雷峰网
雷峰网
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
F
Full Disclosure
Y
Y Combinator Blog
V
V2EX - 技术
Attack and Defense Labs
Attack and Defense Labs
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
SecWiki News
SecWiki News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
量子位
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AWS News Blog
AWS News Blog
Blog — PlanetScale
Blog — PlanetScale
爱范儿
爱范儿
K
Kaspersky official blog
B
Blog
A
Arctic Wolf
Hacker News: Ask HN
Hacker News: Ask HN
L
LangChain Blog
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
Lohrmann on Cybersecurity
D
Docker
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
The Last Watchdog
The Last Watchdog
S
Security Affairs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
Simon Willison's Weblog
Simon Willison's Weblog

博客园 - 愚

Revit:二开使用Sqlite保存本地数据,并配合EF6等ORM框架 Revity:查找并修改类型参数和实例参数 复习一下UML Revit:ElementFilter过滤器基类 Revit:Element、Reference、ReferenceIntersector、ReferenceWithContext的理解 Reivt:过滤器FilteredElementIterator,采集器FilteredElementCollector Revit:Transaction事务 Revit:弄清楚Application、UIApplication、UIDocument 、Document、DocumentSet之间的关系 Revit:IExternalCommand和IExternalApplication的区别 什么是假程序员 若我有一天 聊聊面试官那些事。。分享我的个人看法,认同的顶一顶。。。 提供一个中国身份证号码判断的类 分享一个自己写的取中国农历相关数据的类。包含:农历年月日,生肖,星座,年龄,天干,地支等方法 从结亲网 的架构谈起,谈什么架构, 我理解的架构。我想很多人理解的架构应该可能比较 狭义 面向对象的全套“企业微信”api接口的代码实现,网上太多“面向过程”微信api接口的代码,这个开源给需要的人用 解决:百度编辑器UEditor,怎么将图片保存到图片服务器,或者上传到ftp服务器的问题(如果你正在用UE,这篇文章值得你看下) (原创)面向对象的系统对接接口编写。第5篇(完结) (原创)面向对象的系统对接接口编写。第4篇
Revit:使用代码如何发出选点、选对象指令
· 2020-07-22 · via 博客园 - 愚

事先说明,由于本人是刚接触Revit,所有知识点,都是我自己一边研究一边写的。所以,可能是有错误的,若有错误,还望指正和海涵。

昨天我在想Revit要怎么让用户在操作之前,先选好一个范围或者点呢?原来是像下面这么做。

1.通过ExternalCommandData得到传入的所有参数:commandData

2.选点针对UiDocument,所以: commandData.Application.ActiveUIDocument;

3.开始选点:uidoc.Selection.PickObject(Autodesk.Revit.UI.Selection.ObjectType.PointOnElement);

具体如下图

 下面是Selection所在的类结构:

 从上图我们可以看到,选点、选单个对象、选多个对象、选多个元素、选Box区域等方法。

选点实际是对应PickPoint。

选单个对象应该是对应PickObject。

选多个对象应该是使用PickObjects。

选多个元素通过PickElementsByRectangle,估计是通过框选一个矩形区域来选的。我目前写的Revit文章都是我自己没有亲自写代码实操过的,所以拿不准。

PickBox估计是通过点2下得到一个矩形范围来进行选择。