Using EQS in BT Task

Hi. I need the BT task for checking of the distance to the enemy and doing the visibility test every tick. Can I use EQS queries for this from code? I have found the class FEnvQueryRequest but I need an example for using of this class.