DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DataFileLoadSel. Unwanted channels loaded

Hi,

 

I am working on a procedure that only load only some channels (to save time, I'm given acqusitions with hundred of channels).

 

In DIAdem doc, DataFileLoadSel is usually called with an index, but I want it to be like:

dd.DataFileLoadSel(datFileFull, 'MDF3', '*/XTEMP', 'LoadImmediately|ChnXYRelation')
dd.DataFileLoadSel(datFileFull, 'MDF3', '*/XFLOW', 'LoadImmediately|ChnXYRelation')

 

It works. Unfortunately, that code also loads XFLOW1 and XFLOW2 (it seems all channels whose names start with XFLOW are loaded).

XTEMP is ok because I don't have any variables called XTEMP1, XTEMP2, etc.

 

Although it looks a harmless behaviour, for some reasons I have to check the imported variables names, and having that extra channel gives me a hard time. I'm able to bypass the problem with some nasty tricks, but my code would be much cleaner if I could get rid of unwanted channels. Do you know if there is a way to do it?

0 Kudos
Message 1 of 3
(2,986 Views)

Use the 'or' pipe | character between multiple channels to load.  Unfortunately you cannot use the "*" character for the channel group.  

 

DataFileLoadSel(sDataFilePath, sDataPlugin,"[1]/Time | EXAMPLE/Torque")

 

DataFileLoadSel(sDataFilePath, sDataPlugin,"[1]/*| EXAMPLE/*")

 

 

I wrote function oLoadNavDataFileByChnNames() to solve the problem of loading specific channels using DataFileLoadSel() by name rather than index.  See http://www.savvydiademsolutions.com/navigator.php?topic=Load-specific-channels-from-DataFinder-DataS...

 

 

Message 2 of 3
(2,876 Views)

Thank you for your reply, I appreciate.

 

At the end of the day, I've decided to upload the extra channels and manage them the way I'd manipulate the "right" channels.

It slows down my code, but we are talking about fractions of a second..

 

The "|" operator and is nice, and I often use it. But this time I found it more convenient to load the channel separately (I didn't put the whole code in my previous post, but I have a list of variables and a for cycles that load once at a time).

0 Kudos
Message 3 of 3
(2,868 Views)