Problem setting (int)swUserPreferenceToggle_e.swInputDimValOnCreate to false

Hello everyone, 

I'm trying to write a C# macro for SolidWorks 2024 having trouble to deactivate the "InputDimValOnCreate" UserPreferenceToggle. So I'm not able to run this macro without stopping each time a dimension is created. 

Then I tried to run an example code from the SolidWorks API help hoping it would work there, but same problem with this code. 
(

 

//Line below not working in my case
swApp.SetUserPreferenceToggle((int)swUserPreferenceToggle_e.swInputDimValOnCreate, false);
//Checking it confirms my assumption
bool status = swApp.GetUserPreferenceToggle((int)swUserPreferenceToggle_e.swInputDimValOnCreate) 
//still true

Edit: it seems to be a general problem setting the UserPreferenceToggles. Maybe a problem with rights or settings?

 

Can someone please help me figure out what the problem is? 

 

Thanks in advance.

 

Tom Kreutzer