Re-Order Loggin Channels


Recommended Posts

Is it possible, using a script, to reorder the channels to log in a logging file?  I allow the user to select channels to be logged, but I always want the returned file in the same order, so if they select out of order, I'd like to have a way to sort the channels some way.

Also, if I have my channels arranged in "groups", is there any way using a script to include an entire "group" in a logging file?



Link to comment
Share on other sites

Yes, and yes.


For logging sets, you can programatically fill the list using logging.myLog.clearChannelList() once to clear the list, then logging.myLog.addChannel() to add channels to the list.  The order you call addChannel() will be the order it appears in the logging set.


As for the groups, use channel.listAll("groupName") to get an array of strings containing the channel names, then create a loop on that array to add the channels using the functions I just described.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.