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!

Fantastic. Works very well. I even added a second node to make sure the created in New Construction angles were 90!

Now to figure out how to use Data|Shapes and make it a selectable player script! Thanks!

1 Like

@Jaysyn_Quarry Glad to see this post was helpful for you as well. I could not have done this without all the help I received throughout developing the script. Cheers!

1 Like

This is my graph. The booleans for each the new and existing are inputs that can be switched on and off to only change one, the other or both in Dynamo Player.

You could simplify the graph by using the “OUT” of the boolean mask for your Existing doors.

I am so green at dynamo but trying this for fun. I wanted to do the same thing but I am using a on off parameter to control the doors swing! any help would be great I tried using the above and changing the parameters but it keeps breaking lol

I got it to work wow that was fun. well on to the next one

Awesome! I apologize for not trying to help you out @jarod.tulanowski, but it looks like you figured it out!