is there a possibility to check if a attribute is writable during the runtime ? So in a Method
I need something like this:
if isWriable(AngularConverter.EnergyCurrentState) then ... end;
I need this for an external Programm which needs to check which attributes it can write and only read.
Solved! Go to Solution.
you can use the following trick:
is do print executeSilent(":boolean is do SingleProc.Full := SingleProc.Full; return true; end;"); print executeSilent(":boolean is do SingleProc.Name := SingleProc.Name; return true; end;"); end;
The executeSilent command can be used to execute SimTalk code without generating an error code.
In the first case the assignment to the attribute Full is not valid so the return statement which returns true is not reached. Therefore the default value for a boolean (false) is returned.
But be aware that the inheritance for the attribute is turned off and there is no way to turn it on again using SimTalk.