...
To manipulate variables in CANoe via XIL API, you need to install the correct XIL API components.
Please navigate to the CANoe help and take a look at the section ASAM XIL-API, click on Start Setup
and follow the instructions:
...
Activate the XIL feature in your CANoe project options
Create a MA port config file for ecu.test and use it as part of the test configuration