Create Filter for Non-Existing Views

I have created a script that applies a 3D Ortho view to all Assemblies. I have created a script that creates a .DWG file from those 3D Ortho views. I would like to create a filter for the Assembly Instances that DO NOT have a 3D Ortho view to avoid doubling up on those views. As the .DWG file script is ran it will double up on processing time for multiple views of the same type, also eliminating any processing time for Assemblies that already have a 3D Ortho view.

I have a list of all Assemblies and I have a list of Assemblies with 3D Ortho view. I would need some help to figure out how filter out the lists to get a list of Assembly Instance Assembly Instances that DO NOT have a 3D Ortho view. I have tried Lacing with Cross Product but the data set it creates is so large I don’t know how to handle it.


Hi @RAugustine ,

Use the node List.Contains instead of the String.Contains node. Just make sure the item input is set to list level 1, this will result in a list containing booleans.

Thank you for the response, I was able to achieve pulling the items out of the list that I needed using List.SetDifference Node.

Now the hard part is associating the correct Element to the new list created.


Hi @RAugustine ,

You could use the nodes List.IndexOf and List.GetItemAtIndex for that

I believe what we are trying to create is a bool with the same number of items in the of the element list. I have done something very similar in another script with Code Block " ", but with that the variables are pretty standard so I was able to make a " " list of items.

If we can make my new list similar to the Code Block we might have something.

Success from a different script:

What I would like to recreate:

Need to match the same list number to use the Filter by Bool Mask node

The Revit “Contains” or “==” or “StartsWith” node would only use the first item in the list or last item with (Longest Lacing)

This node from archilab worked like I wanted it to, like a Code Block with multiple “manual” input items.

If you know a way to make this work without Custom Nodes/Python Scripting let me know!

image

Hello…have you tried index off as @Daan mention…

I will try this approach, I can see this working for my needs as well. I will definitely give this a shot when I get back after the holiday. Will get back to you and @Daan with my discovery