123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /*-------------------------------------------------------------------------
- * 功能描述:ParseWall
- * 作者:xulisong
- * 创建时间: 2019/6/25 17:53:27
- * 版本号:v1.0
- * -------------------------------------------------------------------------*/
- using Autodesk.Revit.DB;
- using JBIM;
- using RevitExport.Export;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using JWall = JBIM.Component.Wall;
- namespace RevitToJBim.ComponentParse
- {
- [UsableParse]
- public class ParseWall : ParseBase
- {
- public override List<string> FastIndex()
- {
- return new List<string>() { typeof(Wall).FullName };
- }
- public override bool Match(ElementWrapper wrapper)
- {
- return wrapper.RefElement is Wall;
- }
- protected override List<BimId> ParseInner(ElementWrapper wrapper, JBimParseContext context)
- {
- if (!(wrapper.RefElement is Wall wall))
- {
- return null;
- }
- JWall jObject = new JWall();
- ParseCore.AttachObject(jObject, wrapper);
- context.AddBimObject(jObject);
- jObject.Location = ParseCore.GetLocation(wall.Location);
- //if (fi.Host != null)
- //{
- // jObject.Owner = context.Parser.ParseElement(ElementWrapperFactory.CreateWrapper(fi.Host))?.FirstOrDefault();
- //}
- return new List<BimId>() { jObject.Id };
- }
- }
- }
|