没有合适的资源?快使用搜索试试~ 我知道了~
首页revit API 命令调用格式
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/10466268/bg1.jpg)
Revit 主接口
IexternalCommand 相关接口(Execute 执行方法)
Result Execute 结果执行 (ExternalCommandData 外部命令数据, out string 返回字符串的
类型, ElementSet 元素集)
返回值:(Autodesk.Revit.UI 用户界面(user interface).result 枚举)
参数:
1、Autodesk.Revit.UI.ExternalCommandData 类,externalCommand 所引用的程序和视图
2、Autodesk.Revit.DB 日志(day book).ElementSet 类
Autodesk.Revit.UI.ExternalCommandData 类
Name
Description 说明
Properties
内容
Application
调用 Autodesk.Revit.UI.UIApplication 类
View
调用 Autodesk.Revit.DB.View 类
JournalData
读取和写入数据到 Revit 日志文件的数据映射,返回
IDictionary<string, string>
Autodesk.Revit.UI.UIApplication 类
Name Description
Properties
Application
调用 Autodesk.Revit.ApplicationServices.Application 类
ActiveUIDocument
调用 Autodesk.Revit.UI.UIDocument 类
LoadedApplications
ActiveAddInId
MainWindowExtents
范围
DrawingAreaExtents
Autodesk.Revit.UI.UIDocument 类
Name Description
Properties
Application
返回 Autodesk.Revit.UI.UIApplication 类
Document
调用 Autodesk.Revit.DB.Document 类
Selection
调用 Autodesk.Revit.UI.Selection.Selection 类
ActiveView
调用 Autodesk.Revit.DB.View 类
ActiveGraphicalView
Autodesk.Revit.DB.ElementSet 类
Name Description
Constructors
构造函数
ElementSet
元素集
初始化一个 ElementSet 类的新实例
Methods
Clear
清除集合中的元素,使其为空
Contains(Element)
集合是否包含元素,返回布尔值
Erase(Element)
从集合中移除指定元素,返回移除的个数
Insert(Element)
集合是否插入了指定的元素,返回布尔值
ForwardIterator
前向迭代器
GetEnumerator
接口
ReverseIterator
反向迭代器,逆向迭代器
![](https://csdnimg.cn/release/download_crawler_static/10466268/bg2.jpg)
![](https://csdnimg.cn/release/download_crawler_static/10466268/bg3.jpg)
IExternalApplication 相关接口(OnStartup 启动方法和 OnShutdown 关闭方法)
Result OnStartup(UIControlledApplicationUI 控制应用程序)
Result OnShutdown(UIControlledApplication)
返回值:(Autodesk.Revit.UI.result 枚举)
参数:(Autodesk.Revit.UI.UIControlledApplication 类,Revit 启动或关闭时的操作)
Autodesk.Revit.UI.UIControlledApplication 类
Name Description
Methods
CreateAddInCommandBinding
创建 AddInCommandBinding 约束
RemoveAddInCommandBinding
移除 AddInCommandBinding
CreateRibbonPanel(String)
在 Add-Ins 标签下创建 Ribbon 功能区
面板
CreateRibbonPanel(String, String)
在指定的标签下创建 Ribbon 面板
CreateRibbonPanel(Tab, String)
在指定的标准 Revit 标签创建 Ribbon
面板
CreateRibbonTab
在 Revit 用户界面创建标签
GetDockablePane
通过 ID 获取可停靠窗格
GetRibbonPanels()
获取所有自定义面板从 Add-Ins 标签
GetRibbonPanels(String)
获取所有自定义面板从指定的 Revit 标
签
GetRibbonPanels(Tab)
获取所有自定义面板从指定的标准
Revit 标签
LoadAddIn
从给定的 manifest 文件加载 add-ins
LoadPackageContents
从给定的 packageContents.xml 文件加
载 add-ins
RegisterDockablePane
添加可停靠窗格到 Reivt 用户界面
Properties
ActiveAddInId
获取当前活动的 external application 或
external command 的 id
ControlledApplication
调用
Autodesk.Revit.ApplicationServices.
ControlledApplication 类
IsLateAddinLoading
当前 add-in 是否已加载
LoadedApplications
返回成功加载的 external applications 的
列表
![](https://csdnimg.cn/release/download_crawler_static/10466268/bg4.jpg)
程序(Application)和文档(Document)
RevitAPI 平台最顶级的类是程序和文档,分为用户界面级别和数据库级别,包含的类
有:Application 类,UIApplication 类,Document 类,UIDocument 类。
Revit 单位
Revit 有以下几个使用自己内部单位(internal unit)的基本量。
Base Unit Unit In Revit Unit System
Length(长度)
Feet (ft)
Imperial(英制)
Angle(角度)
Radian
Metric(公制)
Mass(质量)
Kilogram (kg)
Metric(公制)
Time(时间)
Seconds (s)
Metric(公制)
Electric Current(电流)
Ampere (A)
Metric(公制)
Temperature(温度)
Kelvin (K)
Metric(公制)
Luminous Intensity(光照强度)
Candela (cd)
Metric(公制)
UnitType 枚举列举了单位类型
DisplayUnitType 枚举列举了显示单位类型
UnitSymbolType 枚举列举了单位符号类型
Autodesk.Revit.DB.Units 类
Name Description
Methods
GetFormatOptions(UnitType)
获取单位类型的默认格式,UnitType 枚举
GetModifiableUnitTypes()
获取所有默认格式可修改的单位类型,返
回 IList<UnitType>
IsModifiableUnitType(UnitType)
单位类型的格式是否可以修改
SetFormatOptions
(UnitType,FormatOptions)
设定指定的单位类型的格式
Properties DecimalSymbol
分隔正数和小数间的符号
DigitGroupingAmount
按数位分组时,每组数字的个数
![](https://csdnimg.cn/release/download_crawler_static/10466268/bg5.jpg)
DigitGroupingSymbol
按数位分组时,用来分隔数字组的符号
Autodesk.Revit.DB.FormatOptions 类
Name Description
Properties
UseDefault
使用默认格式或自定义格式
DisplayUnits
显示单位
Accuracy
精确度
RoundingMethod
舍入方法
UnitSymbol
单位符号
SuppressLeadingZeros
消除零英尺
SuppressSpaces
消除空格
SuppressTrailingZeros
消除后续零
UseDigitGrouping
使用数位分组
UsePlusPrefix
使用正数的“+”前缀
Autodesk.Revit.DB.UnitUtils 类
Name Description
Methods
Convert(double,DisplayUnitType,DisplayUnitType)
转换单位
ConvertFromInternalUnits(double,DisplayUnitType)
ConvertToInternalUnits(double,DisplayUnitType)
GetTypeCatalogString(DisplayUnitType)
GetTypeCatalogString(UnitType)
GetUnitGroup(UnitType)
GetValidDisplayUnits()
GetValidDisplayUnits(UnitType)
GetValidUnitTypes
IsValidDisplayUnit(DisplayUnitType)
IsValidDisplayUnit(UnitType, DisplayUnitType)
IsValidUnitType(UnitType)
Autodesk.Revit.DB.UnitFormatUtils 类
Name Description
Methods
Format(Units,UnitType,
Double,Boolean,Boolean)
将数字格式化为字符串
Format(Units,UnitType,Double,Boolean,
Boolean,FormatValueOptions)
TryParse(Units,UnitType,String,Double)
将字符串解析成数字
TryParse(Units,UnitType,String,
ValueParsingOptions,Double)
TryParse(Units,UnitType,String,Double,String)
TryParse(Units,UnitType,String,
ValueParsingOptions,Double,String)
剩余45页未读,继续阅读
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![chm](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/45af3cd569294ef8923117213389993b_weixin_40257356.jpg!1)
weixin_40257356
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
会员权益专享
最新资源
- 利用迪杰斯特拉算法的全国交通咨询系统设计与实现
- 全国交通咨询系统C++实现源码解析
- DFT与FFT应用:信号频谱分析实验
- MATLAB图论算法实现:最小费用最大流
- MATLAB常用命令完全指南
- 共创智慧灯杆数据运营公司——抢占5G市场
- 中山农情统计分析系统项目实施与管理策略
- XX省中小学智慧校园建设实施方案
- 中山农情统计分析系统项目实施方案
- MATLAB函数详解:从Text到Size的实用指南
- 考虑速度与加速度限制的工业机器人轨迹规划与实时补偿算法
- Matlab进行统计回归分析:从单因素到双因素方差分析
- 智慧灯杆数据运营公司策划书:抢占5G市场,打造智慧城市新载体
- Photoshop基础与色彩知识:信息时代的PS认证考试全攻略
- Photoshop技能测试:核心概念与操作
- Photoshop试题与答案详解
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)