And this class has a GetOclVariableValueFromName method that returns the IElement that represents the variable.
Just go ctrl.ViewModel.GetOclVariableValueFromName("TheVar").AsObject=DateTime.Now