GetParameterValueByName (TypeOrInstance) auto-flattens lists

I am trying to organize a list of areas based on buildings organized in worksets. I have organized the list by building but when I run it through GPVBN(TOI) it automatically flattens the list.

I need to use type or instance because I have some elements calculated by type, some by instance.

Any ideas how to get this to reorganize? Can I force it with a list.groupbykey or something?

Hi Erfajo,

I started using that node because the OOTB wouldn’t let me get the params from both type and instance parameters. Or was I mistaken?

Kevin

see this: Using Element.GetParameterByName with Instance or Type Parameters:

This does flatten the lists. Apologies for that. Quite a few custom nodes do this as well. I also added a List.RestoreList node to help with this issue. I actually plan on revising this node as it does perform poorly on very large data sets.

1 Like

Thanks!

I got around it by moving my workset based organization to be AFTER the analysis cluster, not before. This allowed me to run calculations on all elements regardless their workset, then sift the data using similar keys after its been calculated.