Andreschrosa Posted January 21, 2009 Share Posted January 21, 2009 How can this be done, I'm trying but getting some errors. I would like to create some V channels and pass to then the data from a QueryToClass function, and then save then to a .xls file using the logging sets. I've tried like this: result = db.QueryToClass(handle,sqlscript) V.Channel.Add(chanprefixes[i]+curnet+"_"+device... ) //not sure what to write here since it's a virtual channel Link to comment Share on other sites More sharing options...
AzeoTech Posted January 21, 2009 Share Posted January 21, 2009 That is correct: v.channel.add("abc") Just remember that when you add channels from a sequence they don't cause the workspace to refresh so they won't show up in the workspace until you manually add a channel. They still exist, they just don't show up in the workspace. The reason for this is performance related. It is assumed that you might be adding a lot of channels dynamically and refreshing the workspace each time is quite slow. That all said, I don't know why you don't just use variables, or better yet, just reference the result class directly. You can't use a logging set because they only work with normal channels, and an export set can reference anything, including a member variable of a class, provided result is global. Link to comment Share on other sites More sharing options...
Andreschrosa Posted January 21, 2009 Author Share Posted January 21, 2009 Cause I didnt read about Export sets, will do it now, thanks for the advice! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.