Null object doubt + Element.Geometry

Hi there

I created a small script in order to get the element with the largest area from a list of elements of the façade. Some of the areas are somehow empty:

I can’t seem to get these null elements out of the list. Are they perhaps no null elements? And then, what are they? And how do I get rid of them?

Anyways, I tried sorting out the areas and matching them up with the elements, but somehow I can’t filter the list with a boolean mask either… could someone please help me out on this one?

1 Like

Thank you very much, John.

Now however, my Curtain Panel Element isn’t being shown. Is “Curtain Panel” not indeed an element with a geometry?

Hmm, it really depends what your curtain panel looks like.

(Also make sure you are filtering the panels themselves like you were in the first post. I didn’t have that in my sample so I just filtered the data)

Thanks again for your quick answer.

So there are these 2 types of elements (“Curtain panel” and “Family_fixe, Type=fixe”), but hte Object.Type from the selected elements seems to be indeed a revit element, any ideas of why it won’t display?

We need to see the actual image of the family. Right off hand you might be able to use the CurtainPanel.AsFamilyInstance node.

I’m afraid I can’t do that, it’s not my model unfortunately. But thank so much anyhow!

Sounds good. To close this out, the Element.Geometry node is a hit or miss depending on your specific geometry in your model. There is no way to reliably troubleshoot what could be going on if we can’t see your specific use-case.

You could possibly reconstruct your general geometry from the curves of the boundaries, but once again, your case might differ than my testing. If you get a null from this, there’s not much else I can do.

image

2 Likes

I think I might know what is going on here…

Assuming Fläche is something like ‘area’, then curtain panels with and empty value for area or other dimension are often created by removing a curtain grid segment. I often find these outliers around entrance doors when I review user content.

The reasoning is that from a database integrity standpoint, the sequence of created panels can’t have a ‘gap’ in the creation as that would create issues on upstream edits which make new panels. To get around this and simplify things the panels which are made redundant by segment removal are assigned a width and a height of that is an empty value, (resulting in an empty area as well) and never displayed in the UI via schedules or model views. You can still grab them by brute force (API or select by ID), which is likely what happened here. Filtering out empty panel areas (and replacing the excluded panel types with a simple type such as ‘empty’ so you can someday purge the original type of needed is how I previously got around this.

1 Like

Thank you very much for your answers.

@john_pierson Sadly, I do get a null if I connect these 2 blocks:

@JacobSmall I think I get what you mean, but then, if I select an individual element, I should get the element displayed, am I right?

I also don’t really understand why I can get the only element that is larger than 26 m2 supposedly right and then the area of the same element is somehow 11.878 m2

In the case I described there wouldn’t be any display as there is nothing to display - the area would be empty in those cases though so that’s not what is happening here.

To John’s earlier point we likely need the model to help.