(edit) Changed the title because a different issue was found and solved. The issue listing all instances of a parent family has been solved. The element ID is still an issue.
(edit 2) The element ID issue has been solved by using the same Node that Kulkul suggested.
Original Post Below
I’m having some issues with the element that Dynamo shows when given an element ID.
Basically, I feed the element ID to a script and the Family it retrieves is the wrong family.
Script and Element attached below. The only node from a package in the script is Element.ById, it is form the Wombat Dynamo package. Running Dynamo 2.0.3 on Revit 2019.2.2
I’ve also uploaded an alternate script that isn’t picking up the existence of the family based on filtering the list of families using String.Contains
Not sure what i’m doing wrong with the script, I’d appreciate any help.
Thanks!
Edit: For the most part, it returns the right element, but for some reason there are some elements that aren’t being picked up properly. (This applies to this script and the alternate script). Also, if it helps. the family does not have any nested families, the shapes are just masking regions.
And here is the alternate script (The errors are just from nulls from repeating details and filled regions/masking regions, I have a version that removes the nulls and the family still does not show up)
I modified the script to use the same nodes as your example, unfortunately, it is still not picking up the family. Multiple instances of the family has been placed on different views: Floor Plans & Drafting views, but none of the instances are being picked up.
Edit 2: Sorry, I wasn’t paying close attention to the script, I am trying to filter by Parent Family, not the Family type. The reason that I used the (edit)FamilyType.Family is because the string it creates includes the Family Type, and also the Parent Family.
The only issue left is that the script is still showing the wrong Parent Family, but I can live with that for now!
The script shows the correct Element ID, but the Parent Family is supposed to be 06_Pull_Edge Pull - Tab1. The script right now is showing 06_Pull_Handle - Round1. See Below: