12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- /*-------------------------------------------------------------------------
- * 功能描述:JBimParseContext
- * 作者:xulisong
- * 创建时间: 2019/6/13 16:50:43
- * 版本号:v1.0
- * -------------------------------------------------------------------------*/
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using JBIM;
- using RevitExport;
- namespace RevitToJBim
- {
- /// <summary>
- /// JBimParseContext解析上下文
- /// </summary>
- public class JBimParseContext: ParseContext
- {
- public JBimParseContext()
- {
- Document = new BimDocument();
- }
- public BimDocument Document { get;private set; }
- #region 数据缓存相关
- private Dictionary<string, BimId> m_RevitIdMap = new Dictionary<string, BimId>();
- public BimId GetBimId(string revitSourceId)
- {
- if (string.IsNullOrWhiteSpace(revitSourceId))
- {
- return null;
- }
- m_RevitIdMap.TryGetValue(revitSourceId, out BimId result);
- return result;
- }
- public BimId AddBimObject(BimObject obj)
- {
- return this.Document.NewObject(obj)?.Id;
- }
- #endregion
- #region 关系数据统一存储
- #endregion
- #region 解析方法
- public List<BimId> Parse(ElementWrapper wrapper)
- {
- return new List<BimId>();
- }
- #endregion
- }
- }
|