|
@@ -57,12 +57,11 @@ namespace RevitToJBim.ComponentParse
|
|
|
#region 所属系统解析
|
|
|
//维护关联并递归
|
|
|
var connectorId = jConnector.SourceId;
|
|
|
- var systemId = connector.MEPSystem?.Id?.ToString();
|
|
|
- if (!string.IsNullOrWhiteSpace(systemId))
|
|
|
+ var mepSystemTypeId = connector.MEPSystem?.GetTypeId();
|
|
|
+ if (mepSystemTypeId != null)
|
|
|
{
|
|
|
- ElementOneToOneRel rel = new ElementOneToOneRel(connectorId, systemId);
|
|
|
- rel.SetElementType(TypeDefinition.Property_MepSystem);
|
|
|
- context.RelationShips.Add(rel);
|
|
|
+ var systemTypeName = owner.Document.GetElement(mepSystemTypeId);
|
|
|
+ jConnector.MepSystemTypeName = systemTypeName.Name;
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
@@ -86,18 +85,21 @@ namespace RevitToJBim.ComponentParse
|
|
|
|
|
|
public override List<ElementWrapper> ArrangeRefElements(ElementWrapper wrapper, JBimParseContext context)
|
|
|
{
|
|
|
- if (!(wrapper.RefObject is Connector connector))
|
|
|
- {
|
|
|
- return null;
|
|
|
- }
|
|
|
+ #region MyRegion
|
|
|
+ //if (!(wrapper.RefObject is Connector connector))
|
|
|
+ //{
|
|
|
+ // return null;
|
|
|
+ //}
|
|
|
|
|
|
- if (connector.MEPSystem == null)
|
|
|
- {
|
|
|
- return null;
|
|
|
- }
|
|
|
- //创建MepSystem
|
|
|
- var mepSystemElementWrapper = new ElementWrapper(connector.MEPSystem);
|
|
|
- return new List<ElementWrapper>() { mepSystemElementWrapper };
|
|
|
+ //if (connector.MEPSystem == null)
|
|
|
+ //{
|
|
|
+ // return null;
|
|
|
+ //}
|
|
|
+ ////创建MepSystem
|
|
|
+ //var mepSystemElementWrapper = new ElementWrapper(connector.MEPSystem);
|
|
|
+ //return new List<ElementWrapper>() { mepSystemElementWrapper };
|
|
|
+ #endregion
|
|
|
+ return null;
|
|
|
}
|
|
|
}
|
|
|
}
|