Check Group Creator ID Returning Empty List

Hi Everyone,

I am running into an issue using Archi-lab’s Collector.ModelGroupByName, which I am getting mostly empty list. Can someone explain what is causing that issue?

Cheers,
Kevin

Can you confirm that there are instances of those groups?

Hi JacobSmall,

Those groups do have instances in the project, only a small handful of groups are currently unplaced shown in screenshot below;

Thanks

In addition, I’ve noticed the GetWorksharingTooltipInfo retrieves the creator who placed the group, is there a way to find out the initial group creator?
The point of the exercise is to raise user awareness when modelling groups.

Wonder if anyone has an answer for this

Got an RVT file to test on?

@kevinShen

First things first, the Collector.ModelGroupByName is actually from @john_pierson 's Rhytm package not from Archi-lab.net Even though its not my package I am sure there is nothing wrong with it. You are using a component from Archi-lab.net to collect all DETAIL groups, and then try to get their instances using a MODEL group collector. They are not compatible. There are two (2) different group categories: Detail, and Model. They are not the same thing. You can easily modify John’s node to collect Detail groups instances like so:

Here’s the code for the new collector:

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
names = IN[0]
collector = FilteredElementCollector(doc)
groups = collector.OfCategory(BuiltInCategory.OST_IOSDetailGroups).WhereElementIsNotElementType().ToElements()

groupInstances = [[] for i in range(len(names))]
for index, name in enumerate(names):
	for group in groups:
		if group.Name == name:
			groupInstances[index].append(group)

OUT = groupInstances

Here’s the definition:

detailGroupCollector.dyn (13.6 KB)

One last comment. You asked about the Element.GetWorksharingTooltipInfo component. That’s from archi-lab.net so I can answer that question. The three (3) outputs are:

3 Likes

Hi Konrad,

Appreciate your time for the detailed explanation, and thanks @john_pierson for the Rhythm Package.
I definitely missed the simple error using the wrong Model group node to collect detail groups because not all result was returned as empty list, good reminder for the future.
I will definitely need a bit more time to digest the python code, for now, I will run a few test runs on the provided script and see how it goes.

Cheers,
Kevin