1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
-
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using JBIM;
- using RevitExport.Export;
- using Autodesk.Revit.DB;
- using RevitToJBim.Common;
- using JUnit=JBIM.Component.Unit;
- namespace RevitToJBim.ComponentParse
- {
-
-
-
- [UsableParseAttribute]
- class ParseUnit : ParseBase
- {
- public override List<string> FastIndex()
- {
- return new List<string>() { CategoryGenerator.BuildingCategory(Common.FamilyType.Other) };
- }
- public override bool Match(ElementWrapper wrapper)
- {
- return wrapper.RefObject is FormatOptions;
- }
- protected override List<BimId> ParseInner(ElementWrapper wrapper, JBimParseContext context)
- {
- var options= wrapper.RefObject as FormatOptions;
- if (options == null)
- {
- return null;
- }
- JUnit jObject = new JUnit();
- jObject.Name = "Length";
- jObject.Tag = "长度单位";
- jObject.Value = options.DisplayUnits.ToString();
- context.AddBimObject(jObject);
- return new List<BimId>(){jObject.Id};
- }
- }
- }
|