element and room classes in revit are not connected. To get all room classes in project need
1 | var rooms = collector.OfCategory(BuiltInCategory.OST_Rooms).OfClass(typeof(SpatialElement)).ToElements(); |
To get.
Author: Broccoli
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles
2019-10-10
获取项目内所有的房间
revit中element与room类不想通,想要取得项目中所有的room类需要 1var rooms = collector.OfCategory(BuiltInCategory.OST_Rooms).OfClass(typeof(SpatialElement)).ToElements(); 获取。

2021-09-14
QT+ CLion + Revit 问题汇总
ui因为一直想实现QT+CLion+Revit的开发路径,所以从头开始学习QT与C++,在这里记录一下QT遇到的问题及后续的问题。如果开发周期不足估计会用一两周爆肝出来,随时会断更。 目前的思路是C++创建dll,在dll里面编写QT界面,之后用C++ Revit 的API接口实现整个步骤。中间需要用到sqlite3的数据库组件,目前就想到这么多。现在已经实现c++读取sqlite3并完成数据接口。 由于项目进度,之前为了实现cpp+QT耽误了太多时间,所以国庆肝了三天完成整个程序,能够将整个数据库的结构模型创建在revit中,在思路已经清晰的情况下,写起来速度确实快了很多,用完cpp再用c#发现c#的继承还挺好用的,测试一下整个项目之后再继续修复这个项目。下面是所有楼板的成果,21层的框架结构预估时间在十分钟以内可以完成,我是分块测试没有集中测试,明天去公司测试一下。 @[toc] 2021/09/14SQLite3带有中文路径的字符串转码12345678910111213141516171819202122232425262728293031323334...

2021-09-14
QT+ CLion + Revit Issues Summary
Because I always wanted to implement the QT+CLion+Revit development path, I started learning QT and C++ from scratch. Here I record the problems encountered in QT and subsequent issues. If the development cycle is insufficient, it is estimated that I will burn the midnight oil for one or two weeks to get it out, and updates may stop at any time. The current idea is to create a dll with C++, write the QT interface in the dll, and then use the C++ Revit API interface to implement the entire ste...

2020-05-19
使用NSIS制作revit插件安装包
@TOC 使用NSIS制作revit插件安装包下载NSIS DOWNLOADHM NSIS Addin文件==我们需要将addin文件进行单独存放==位置放在读取文件的section后就可 修改脚本文件 增加对addin文件的路径自动修改 1234567891011 Section change StrCpy $1 "<Assembly>" StrCpy $1 "$1$INSTDIR" StrCpy $1 "$1\bin\De··bug\Panel.dll</Assembly>" Push <Assembly>name.dll</Assembly> #text to be replaced Push $1 #replace with Push all #replace all occurrences Push all #replace all occurrences Push C:\ProgramData\Autodesk\Rev...

2020-05-19
Use NSIS to Create Revit Plugin Installer
@[TOC](Table of Contents) Use NSIS to Create Revit Plugin InstallerDownloadNSIS DOWNLOADHM NSIS Addin File==We need to store the addin file separately==Just place it after the section reading the file Modify Script File Add automatic modification of addin file path 1234567891011 Section change StrCpy $1 "<Assembly>" StrCpy $1 "$1$INSTDIR" StrCpy $1 "$1\bin\De··bug\Panel.dll</Assembly>" Push <Assembly>name.dll</Assembly&g...
2021-01-19
WCF Use Console to Drive Revit
Currently doing family library project, already made WPF interface but because it was WPF project at start, intermediate interaction operations need to be implemented in Revit, thinking of driving Revit through WPF thereby implementing communication between two windows. One way is generic, implemented using external event, this path is relatively easyAnother way is when reading jimmy‘s blog found a case, using WCF as connection to drive two independent programs. Regarding creating WCF program...
Announcement
欢迎访问!右上角可切换中英文。感谢您的阅读!

