Altium: Polygon-Specific Rules
InNamedPolygon returns the primitives of a polygon
Which means objects that are owned by the polygon in the hierarchy
I think you need IsNamedPolygon which returns the polygon itself.
The problem there is that when you query it they will all &quot;light up&quot; the same way, since, you see the polygon is what composes it. But it is not of polygon type itself.