I don't 'do' New Year resolutions... but I have said to myself I need to get my head around Dynamo, so here I am!
I thought I'd start with something simple, but alas... (Revit) Type parameters. I'm stumped at first hurdle. Working with (element) Instance parameters seems to be handled OOTB - but 'getting at' - or more specifically 'filter by' (type parameters) seems, by my current "understanding" a bit round-the-houses.
At least not without custom packages. And, much like (Revit) addins, I'm of the (masochistic) mind to try and make things work OOTB before reaching for magic buttons - simply because I want to keep the worry of deploying a consistent Dynamo to my users to a separate question...
So what is that I am actually trying to do?
Well, all of my families differentiate themselves between being an "Assembly" or a "Component" - in so much the highest level parent family of say a door (or more accurately a doorset) is the "Assembly", and all "child" parts, (i.e. frame, panel, ironmongery,etc) are (shared) "Components". This is all handled by a Y/N selector for both, and a third parameter <Model Hierarchy> that returns a respective text value thanks to an IF I have in every family.
Still with me? Hope so.
Right, so I go to Dynamo, and want to do a concatenate trick (might as well start simple here) with some (instance) parameters to automate-populate the <Mark> field.
Simples, a bit of copification (I've done this already with rooms & areas) pretty much gets me where I want to be....
Until I realise/notice/despair that I'm collecting EVERY instance of EVERY door family.
In a test scene with only 36No. "Assembly" door(sets), that translates to 774 (door family) instances.
I've projects I want to push this out on that have 3000+ "Assembly" door(sets). The maths frightens me (& my computer). Not to mention, the "children" families don't have the instance parameters populated, and concatenating them will generate duplicate mark errors - which is one of the exact reasons why I'm tackling this.
So, obviously, I want to filter the (list of) elements before plugging into the Element.SetParameterByName
To Google! And a whole load of threads, many similar, but not quite close enough.
I've found the nodes, and steps that can get me an element's family, and in turn, parameters from that family (that itself 54213 list items alone from this 36No. door test!!!!) and w/ a basic understanding of the Boolean node (not quite ready for the shorthand IFs of Dynamo's Code Blocks) I've ended up with a (filtered) list - of the 36 doors I do wish to process - but plugging that output into with the concatenating part throws the wob:
...and I get despondent.
Here's the whole thing:
How do I rally round the filtered to the function?
Have I got about this the wrong/right way round?
As before, I would prefer OOTB-leaning answers, but if there is a magic button out there, I could be persuaded.
*my door families are, how would one say, a tad involved.