I want to replace 6 parking family with a model group that has 6 parking for further easier modification.
I have the center point, I have my group but neither Steam node, nor the MEP node working.
I have seen in older topic MEP node required the group to be created before placement. I don’t want this, my groups are ready and been used in the project already.
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
# Import geometry conversion extension methods
clr.ImportExtensions(Revit.GeometryConversion)
doc = DocumentManager.Instance.CurrentDBDocument
locationPoint = IN[0]
groupType = IN[1]
TransactionManager.Instance.EnsureInTransaction(doc)
#TODO: can this method return None on error or does it always raise and exception on error?
groupInstance = doc.Create.PlaceGroup(locationPoint.ToRevitType(True), UnwrapElement(groupType))
TransactionManager.Instance.TransactionTaskDone()
#Assign your output to the OUT variable.
OUT = groupInstance.ToDSType(True)