using Autodesk.Revit.DB;
|
using Autodesk.Revit.DB.Plumbing;
|
using System.Collections.Generic;
|
|
namespace HStation.RevitDev.RevitDataExport.Utility
|
{
|
public static class ConnectorExtense
|
{
|
public static List<Element> GetConnectorElements(this Connector connector)
|
{
|
List<Element> ret = new List<Element> ();
|
if (connector == null) { return ret; }
|
var refs = connector.AllRefs;
|
foreach (Connector reference in refs)
|
{
|
if (reference.Owner.Id == connector.Owner.Id) { continue; }
|
|
var owner = reference.Owner;
|
if (owner is PipingSystem ps)
|
{
|
continue;
|
}
|
else
|
{
|
ret.Add(owner);
|
}
|
}
|
return ret;
|
}
|
}
|
}
|