Obstacle in calculating number of Curtain Panel for a Polygon Surface

Hi,
I am trying to calculate the number of curtain panels located in polygon surface.
To do that, I am filtering the curtain panels which dont have plane by boolean options. It works and generates its total number with this code and illustration:

However, it shows that CurtainPanel.HasPlane has “Warning: CurtainPanel.get_HasPlane operation failed.”. It is less good to look at in Dynamo Player.

Is there improved or another way to remove this warning? I upload the project file and script to have a look:
Calculate Number of Curtain Panel.dyn (15.3 KB)
Project_1.rvt (6.0 MB)

Thank you :slight_smile:

[Update] Just found a solution by utilizing this code. :slight_smile:

Calculate Number of Curtain Panel.dyn (15.3 KB)