This is not the purpose of If / Then / Else syntax in Eldo. The condition of the IF statement needs to be resolved at elaboration, not at DC or during any other analysis. So you cannot test the voltage of the pins of the circuit.