123456789101112131415161718192021222324252627282930313233343536373839 |
- /*-------------------------------------------------------------------------
- * 功能描述:DocumentOpenedHandle
- * 作者:xulisong
- * 创建时间: 2019/7/18 13:33:26
- * 版本号:v1.0
- * -------------------------------------------------------------------------*/
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using Autodesk.Revit.UI;
- using FWindSoft.Revit;
- namespace LRH.Tool
- {
- public class DocumentOpenedHandle: IRevitRegister
- {
-
- private void Application_DocumentOpened(object sender, Autodesk.Revit.DB.Events.DocumentOpenedEventArgs e)
- {
- var paneId = DockablePanes.BuiltInDockablePanes.PropertiesPalette;
- DockablePane pane = ExternalApplication.CurrentApp.UIControlApp.GetDockablePane(paneId);
- pane.Show();
- //MessageBox.Show(e.Document.Title);
- }
- public void Register(ExternalApplication application)
- {
- application.DocumentOpened += Application_DocumentOpened; ;
- }
- public void Unregister(ExternalApplication application)
- {
- application.DocumentOpened -= Application_DocumentOpened;
- }
- }
- }
|