04-23-2020 11:15 AM
Hi all,
I have been appointed to write a script that automatically flags curtain points on the view form based on the X and Y locations that is predefined within a text file.
Text file example:
16,100
25,80
115,91
I have successfully written a script that opens the text file and reads the content.
The script then clears all current flags using the ChnFlagDelAll() function and implements the flags one by one based on the locations within the text file.
However, making use of ChnFlagSet() function simply does not work. It does not display any errors and therefore seems to be doing something in the background. It is kind of like I am pushing the data to an incorrect object.
I am possibly using the incorrect function to emulate the button "Set Data Point and Flag"
I am unable to find any documentation on this function. Can anyone please assist me?
04-24-2020 01:18 AM
Hi WayneDev,
Please have a look at the following example:
dim oChn
set oChn = Data.Root.ChannelGroups(1).Channels(2)
' set flag in channel for a certain index
oChn.OperationalFlags(100) = true
' set flag in channel for a certain value of the channel
oChn.OperationalFlags(pno(oChn, 50)) = true
' set a range of flags in channel index based
call ChnFlagSet(oChn, 500, 200, true)
Greetings
Walter