Files
06-Note/Revit-API/UIApplication.md
sherlockforrest bf2ed2e31f 更新
2023-06-20 09:22:53 +08:00

42 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## ActiveAddInId
### 会返回当前所执行事件对象 UI application, DB application, or an external commandnull
## CreateAddInCommandBindingRevitCommandId arg
### 获得一个REVIT命令的bind对象可以利用对象给改命令添加事件参数如下获得命令的ID
## DrawingAreaExtents()
### 获得当前窗口的绘画区域Recangle
## LoadAddInString fileName
### 从指定的文件地址加载应用
## LoadedApplications
### 获得所有成功加载的外部事件数组。
## MainWindowExtents
### 获得主窗口的Recangle
## OpenAndActivateDocument(String fileName)
### 根据指定的绝对路径打开revit可执行的文件
## PostCommandPostCommandId
### 执行revit中的命令参数获得方法
RevitCommandId.LookupPostableCommandId(PostableCommand.Window)
- // revit中的每个操作都封装成对应的Command 枚举,通过PostCommand可以调用该命令
UIApplication application = commandData.Application;
application.PostCommand(RevitCommandId.LookupPostableCommandId(PostableCommand.Beam));
## RegisterDockablePane
### 注册自定义的可停靠窗口
实现接口Page.IDockablePanelProvider
```
public void SetupDockablePane(DockablePaneProviderData Data)
{
Data.FrameworkElement = this as FrameworkElement;
Data.InitialState = new DockablePaneState();
Data.InitialState.DockPosition = DockPosition.Bottom;
}
```
## ViewActivated
## ViewActivating