04-05-2017 07:22 AM
Hi,
When I load certain datafiles, some time channels appear as write protected. I use ChnValExpand which appears to work (the little symbol disappears from the channel name). However, the channels remain protected and I am unable to write to them. How can I remove the write protection?
Any help is appreciated
Thanks
Thomas
Solved! Go to Solution.
04-05-2017 07:34 AM
Hi Thomas,
It seems that this is a bug. If you some similar code like this below, the you get an error regarding write protection:
dim oChn set oChn = Data.Root.ChannelGroups(1).Channels(1) call ChnValExpand(oChn) oChn(1) = 5
The workaround is to redefine the object variable oChn like this:
dim oChn set oChn = Data.Root.ChannelGroups(1).Channels(1) call ChnValExpand(oChn) set oChn = Data.Root.ChannelGroups(1).Channels(1) oChn(1) = 5
The all is fine.
Greetings
Walter
04-13-2017 02:38 AM
Hi Walter,
Thanks!
Thomas