DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to make use of ChnFlagSet

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?

 

WayneDev_0-1587657796357.png

 

WayneDev_1-1587657985631.png

 

 

0 Kudos
Message 1 of 2
(2,056 Views)

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

0 Kudos
Message 2 of 2
(2,012 Views)