Model Groups from Linked File

Hi All,

Would someone be able to help me modify this (modified) code to select Model Groups from a Linked File? I don’t have the coding knowledge :frowning:

Thanks in advance,

Mark

#Copyright© 2015, Konrad Sobon
# @arch_laboratory, http://archi-lab.net

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

# Import RevitAPI
clr.AddReference(“RevitAPI”)
import Autodesk
**from Autodesk.Revit.DB import ***

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

**from System.Collections.Generic import ***

#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN

collector = FilteredElementCollector(doc)
groups = collector.OfCategory(BuiltInCategory.OST_IOSModelGroups).WhereElementIsNotElementType().ToElements()
OUT = groups

Thanks Emmet, that feels like a long time ago!

yeah no worries
 I am sure you have long been past a solution for this. If this does solve your issue check the little solved box at the bottom of my post.