FamilyInstance.Location operation failed

I’m working with some windows and trying to get their location. However, when I use the FamilyInstance.Location node, It gives me the error “Warning: FamilyInstance.get_Location operation failed.” I have also tried the clockwork node Element.Location which outputs that the window has no location. It seems to be limited to one particular family as others are working correctly. I’ve attached the affected family, so if anyone can help I’d appreciate it. ThanksWN-05-RETAIL.rfa|attachment (340 KB)

Please share Screenshot of dynamo diagram.

Oh yea sorry about that, I meant to post this too. Here’s the dynamo script

You are not actually pulling data from any placed family :slight_smile: You’re just querying an unplaced version from the model.

Try using Category and All Elements of Category with a filter to get the particular family type you are looking for.

I gave this a go and it’s giving the same result. I think though that I am querying specific placed instances of the family because if I change to a different family, the script works:

You can see in the bottom right corner, that it is giving me points in space where those particular instances occur. This is what makes me think that there is something wrong with the family itself

Ah, my bad. How about trying All Elements of Family Type node in lieu of the FamilyInstance.ByFamilyType with the original family?

Your family is a curtain wall based family so what you’re describing is expected behaviour. Are you saying you have other curtain wall based families that actually return a location?

1 Like

@Andreas_Dieckmann No, I did not realize it was a curtain wall based family, as all of the other windows in this project are normal windows :unamused: So since that’s the case, i need to find a workaround, since curtain panels don’t have a location property.

You could use Element.Geometry and then pull the resulting solid’s centroid.
Personally, if the result doesn’t need to be 100% accurate, I would just create a (Revit) BoundingBox around the panel and compute the centroid of the BB (there’s a Clockwork node for that). Much faster than Element.Geometry, especially with a large number of elements.

If you don’t mind looking back on this somewhat old post, would you be able to elaborate on this a little bit? I’m new to Dynamo and I’ve been looking for a way to find the XYZ of every element in my project, including elements without a location parameter. So what you’re suggesting sounds perfect because I do have A LOT of elements and the location doesn’t need to be exact. The centroid of the BB of each element just needs to be unique so I can tell one 8’ column from the next … Specifically what isn’t clear to me is:

  • “just create a (Revit) BoundingBox around the …” How are Revit BBs created? Do they not always exist? Can this be done for any element that exists in Revit?
  • Do you remember which clockwork node you’re referring to? If not, I have the package installed so I’m sure I can find it eventually …

This node can help for a start:

…along with BoundingBox.ToCuboid + Solid.Centroid, or directly BoundingBox.CenterPoint from Zhukoven.
Please open a new topic if you encounter specific issues with your workflow.

Will do. And I’ll check out those nodes. Thank you.