# Set rules for net connected to specific component in Altium

I'm using Altium 17.1. I'm trying to set a clearance rule for my PCB. Some of my components have tight pads and thus I need to set a low value for that component. I set the pad to pad clearance with InComponent query to skip pad to pad check. Now I'm trying to define a clearance rule for all nets connected to a specific component. I don't want to set individual rule for nets one by one. I tried to use this query but didn't work:

InNetClass('All Nets') and InComponent('U5')

Actually, I'm trying to use Autoroute But I want to set low clearance for specific components that their pad is very tight compared to other parts. EDIT: I'm trying to say that the green clearance is fine and for the red circle is violate. Suppose clearance between these pair nets is the same.