Hi everybody,
I search how extract all information and parameters from connectors.
With Dynamo i don’t find, but with Python and Dynamo may be ?
I find how count all connector in a family and also compare with electrical parameters.
So I can define if the family is correct :
with one connector minimum
with the correct system type for the category
But i can’t read:
Power Factor state
Power Factor
Utility
Connector description
Have a good day
Daniel OLIVES
WSP France Lyon
Hi,
Thank’s for your help.
I don’t know Python so I try to my first step to use an existing RIE Power “GetElementConnector” Python.
I joint picture of my Dynamo I just read some parameters and export them to Excel.
Some are disconnect (space: too slow for test)
I want to separate output and add Some other parameters.
Power State Factor (more usefull)
Load Sub-Classification Motor (less usefull)
Power Factor (more usefull)
Utility (less usefull)
(Sorry for my poor English.)
Daniel OLIVES French user
WSP France - Lyon
Original Code:
import clr
import math
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion) #The inputs to this node will be stored as a list in the IN variables.
if isinstance(IN[0], list):
fittings = UnwrapElement(IN[0])
toggle = 0
else:
toggle = 1
fittings = [UnwrapElement(IN[0])]
OUT =
p =
rep =
ref =
for fitting in fittings:
points =
report =
refs =
connelem =
info =
try:
connectors = fitting.MEPModel.ConnectorManager.Connectors
except:
connectors = fitting.ConnectorManager.Connectors
for conn in connectors:
info.append([conn.Owner, conn, conn.Origin.ToPoint()])
connelem.append(conn.Owner)
points.append(conn.Origin.ToPoint())
result = ""
try:
result += "Direction: " + conn.Direction.ToString()
except:
result += "Direction: N/A"
result += ", AllRefs Size: " + conn.AllRefs.Size.ToString()
result += ", Domain: " + conn.Domain.ToString()
result += ", Type: " + conn.ConnectorType.ToString()
report.append(result)
for c in conn.AllRefs:
refs.append(c.Owner)
OUT.append(info)
p.append(points)
rep.append(report)
ref.append(refs)