List Matching Improvements

Hello Everyone,

I have a working dynamo script here, but am seeking suggestions for consolidation of my rats nest of nodes in a specific area of the script, pictured. There are not issues with this, it is a working dynamo script. I just want to learn and improve.

At unseen portions of the script, it orders placed model instances by a parameter values, getting us to “Sorted Instances…” at upper left. Below in blue groups, it creates a matching list of very specific Generic Annotation Families.

The placed model instances have differing family type names vs the generic annotation family names I want to populate in the drafting view, hence the string split portion of the script removing the “(??)” characters.

In earlier versions I did try a “String Contains” node of all of my Generic Annotation families, but it was a bit finicky. I needed it to be more specific by seeking the exact Generic Annotation families I wanted.

Those generic annotation families are then ordered to match the model instance list. Eventually these insert into a drafting view at specific coordinates with specific parameters, all pulled from the model elements.

Its a diagram generator essentially.

Any suggestions for improvement in this area of the script will be well received. Thank you.