...
Info |
---|
The script uses the most general importer class so that you it can be easily adapt it adapted to other importer types. e.g. jC.newComponent(jbComponentIF.MDF_FILE, false); |
...
Opening the resulting import window shows that only the two named channels were actually loaded, the rest is set to ignored state.
...
Deciding Based on Mapped Names
The above script decides on the LoadStatus based solely on the Result Name. This is sufficient in most cases. In more advanced cases, it may be the case, that this decision should be made based on the mapped name. But this channel name/unit mapping functionality is actually only carried out at the end of the import.
This can be achieved using non-public script functions:
Code Block |
---|
//Initial to generate the mapping
importer.initializeChannelNameUnitMapping();
//Get mapped name for the individual channel header
String mappedName = importer.mapUnitAndGetTargetName(channelHeader, jbDataObjectIF.DOUBLE_CHANNEL); |
With this information, the initial script (especially the if-condition at the end) can be extended.