I have a script which will turn on attached detail groups for specific views, when listing out the available detail groups it will list all detail groups. This list includes the detail groups also not compatible with some views.
I believe you’re currently working with the group type. You would need the specific instance in order to get the instance parameters. Can you share a screenshot (use Export as Image) of your full graph in action?
To add to this, following earlier comment about reading the group types, I looked at the parameters I get from an instance of an attached detail group (the few nodes to the left before the orange groups).
I can see here the workset for the placed groups, I need to have a think abut how I can use this. Most of my groups have the same name, be it a plan/elevation/section detail group.
I think naming the groups with a suffix to indicate if it’s plan/elevation/section might be an easier route, more prone to user error though if not used correctly.