Hey there! If the MEPover package author is on here, first off your package is a god-send. It’s helped out a ton and I really appreciate the efforts you’ve put into creating it and maintaining it. Thank you, thank you, thank you. Here’s the situation…
I’m QC’ing my company’s scripts as we get things ready for R23 and the Connector.Shape node is spitting out null where in previous Revit versions it used to output “Rectangular”, “Round”, etc.
I’ve scoured the Revit API docs website and tried everything I could think of to find the solution on my own, but I’ve hit the limits of my API / Python knowledge.
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
#Preparing input from dynamo to revit
element = UnwrapElement(IN[0])
#Do some action in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
TransactionManager.Instance.TransactionTaskDone()
OUT = element
That’s odd. I’m also returning the same integer values from the enumerable, but Lookup still shows them as shapes (as does API documentation). Not sure what’s going on here.
Just in case you’re stuck at the moment, the enumerables are as follows:
@Draxl_Andreas Yes. All the Python headers look correct. Good idea though. The node has worked great in the last 4 Revit versions prior to 2023, so my guess is some thing changed with the new version, like @Nick_Boyts alluded to.
This looks to be an old post but I’m running into the same thing. The odd thing is, if the python node is set to run IronPython2 then it shows the shape but if the node is set to CPython3 then it returns the integer value.