123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- /*-------------------------------------------------------------------------
- * 功能描述:RevitCore
- * 作者:xulisong
- * 创建时间: 2019/3/12 10:44:21
- * 版本号:v1.0
- * -------------------------------------------------------------------------*/
- using Autodesk.Revit.UI;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Autodesk.Revit.ApplicationServices;
- using Autodesk.Revit.DB;
- using Autodesk.Revit.UI.Selection;
- namespace FWindSoft.Revit
- {
- /// <summary>
- /// revit核心类信息
- /// </summary>
- public static class RevitCore
- {
- public static void InitCore(UIApplication application)
- {
- UIApp = application;
- }
- #region 关联属性
- //public static UIControlledApplication UIControlledApp { get; private set; }
- public static UIApplication UIApp { get; private set; }
- public static Application App
- {
- get
- {
- return UIApp?.Application; ;
- }
- }
- /// <summary>
- /// UIdocument
- /// </summary>
- public static UIDocument UIDoc
- {
- get
- {
- return UIApp?.ActiveUIDocument;
- }
- }
- public static Document Doc
- {
- get
- {
- return UIDoc?.Document;
- }
- }
- public static Autodesk.Revit.Creation.Application AppCreater
- {
- get { return App?.Create; }
- }
- public static Autodesk.Revit.Creation.Document DocCreater
- {
- get
- {
- return Doc?.Create;
- }
- }
- public static Selection Selection
- {
- get { return UIDoc?.Selection; }
- }
- #endregion
- }
- }
|