Yes, please see https://www.youtube.com/watch?v=UAZuflGNEps&index=7&list=PLS8vhyBd_bXnly7paSPdvwt2r7xKMo6tV


A detailed write up in available in the user manual under the section "How to write custom code in NetSim"