Help - Only Change Doors in Existing Phase to 45°

I am new to Dynamo, so forgive me if this question has been placed on the forum.

I am trying to develop a script to execute to change ONLY the existing door swings to 45°. (Instead of opening an existing view - select all type - change to 45° - select another door type - change to 45°)

I am in any view (Phase = “New Construction”, a phase filter “Show Previous & New”) and when the script is executed - it changes ALL doors to 45°. I am having a hard time filtering OUT the doors created in “New Construction” and/or only selecting the doors created in the “Existing” phase.

See Image below. I selected a door family to show the parameters i am trying to edit through Dynamo.

Thanks in advance!

Then you’re new to dynamo
here is how you filters

Gotcha, I will try this out. Thanks for the response!

Hey @Akli.baliche

I took you advice on filtering and re-worked the script. It is so close, and I must be missing something small. The filter is too restrictive somehow - because only one (1) existing door changes to a 45° (even though all of the existing doors that did not change to a 45° have the same properties to the one that did change).

In the image below, you can see that i tried a few different code blocks to filter the doors, but it did not seem to work.

In the image below, the selected door was the one that cooperated with the script.

In the image below, this is the properties of all the other doors.

Let me know if you would like the script to see if that would help.

You want to use the == node to compare which element phases are equal to “Existing”.

2 Likes

You can either use an == node in place of the List.Equals or change the list level of the List.Equals node.

The List.Equals node compares 2 lists to see if they are the same, but the == node can compare what is inside the list with something else. It is the difference between comparing the overall list and the things inside the list.

For the FilterByBoolMask node to be useful, the bool mask (list of Trues or Falses) should have the same amount of items as the thing you are filtering (in this case the list of phase names). Right now you only have one False showing so the filter isn’t working properly.

@Nick_Boyts Thanks so much! that helped out a lot !

With everyone’s help, I was able to get it to work! Thanks so much @Akli.baliche, @Nick_Boyts, @kennyb6 !!
I have included the image of the working script


and provided the working plan - i added double doors to check as well.

Thanks again!