Apply 2 functions to list

Hi I’m trying to create floor or ceiling plans depending on if its true or false and get the same ordered list after. However I’m not sure how to apply the function to the list. Struggling to explain this one but hopfully my snip below helps. The function apply list should be 24. Never used them before so not sure.

This works but it dosnt work because I’m getting extra views I dont want…

Not as cool but merge bool mask works

Translate the view creation nodes and the If node to a DesignScript codeblock (Node to Code if you’re unfamiliar) and merge everything into a single “line”. That will allow you to control exactly which items get a FloorPlan and which items get a CeilingPlan while maintaining the original list order.

It should look something like this:
isFloorPlan ? CreateFloorPlan(item) : CreateCeilingPlan(item);

4 Likes

Way cooler

Omg how am I just learning this now :rofl: :rofl: :rofl:

1 Like

is this screenshot from the dynamo-primir ?
how can i activate this in dynamo`?

Particularly the codeblock is fancy!

It’s highlighting and right clicking on the white space is the trick to get more options. Years on dynamo and never new. Should really read the how tos

1 Like