04-26-2013 08:49 AM
Hi
As of V2012, I find that ASCII-import-plugins created with the DPWizard are stored with extension .vby and marked as VBCrypt in the PlugIn property dialog.
I'd like to use 'wizarded' scripts as a starting point for modifications, which now is no longer possible.
Since it is still possible to manually encrypt files, I wonder, is this a bug or a feature? Or have I changed some setting inadvertantly?
Thanx for a clue.
Michael
Solved! Go to Solution.
04-27-2013 11:45 AM
Hi Michael,
It's not you, it's us. DIAdem 2012 did indeed change the Text DataPlugin Wizard so that it creates encrypted DataPlugins. This is not a bug but rather a change in philosophy. The DataPlugins the Text DataPlugin Wizard creates were always quite complicated, because the resulting VBScript is a huge state machine that can handle all sorts of parsing details, and all the Wizard does is set some of those parameters. The feedback we got was that customers were unsuccessful in their attempts to make a small change to the VBScript the Text DataPlugin Wizard creates. R&D felt like this change to auto-encrypt would save more customer time than it would create customer frustration. As one of the few who was comfortable doing this, you are now justifiably and understandably frustrated. The Excel DataPlugin Wizard, by contrast, produces VBScripts that are quite straightforward, because the Workbook reader handles all the parsing details, so these VBScripts are still unencrypted.
I would be happy to assist you in learning how to create DataPlugins from scratch. The resulting code you get this way is more efficient and MUCH easier to maintain moving forward than the hundreds of lines of code you get from the Text DataPlugin Wizard.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
06-13-2014 08:45 AM
Hello Brad,
actual I do some adaption of a vbs-script for a data analysis imported from a txt-file by using a dataplugin. I used the dataplugin assistant to create the plugin. On the first view it worked fine, but then I recognized that some text data is imported as numeric data and I wanted to correct this. First I tried to use the dataplugin again, but there is a problem that I cant configure the specific channel because it isnt shown in the selection. After a number of more than 50 channels I cant configure the data type of more channels. And I have to. So I also thought of editing the code of the dataplugin, but it is as I read in this posting it ist not possible to do that with the Diadem 2012. So what can I do instead of building a special data file with critical channels below 50?
Greetings,
Kolja Gruß
06-16-2014 01:34 PM
Hi Kolja,
Please answer my response to your other post on this issue.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-01-2016 11:18 AM
I would love to learn Brad
How can I begin?
04-04-2016 05:21 PM
Hi Tim,
What, exactly would you like to learn? The above post describes a change in the way the Text DataPlugin Wizard behaves from DIAdem version to version.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-08-2016 09:35 AM
Hey Brad
I would like to learn how to Script my own data plugins.
I find using the wizard has limitations that I am hoping scripting my own I will be able to correct.
I stumbled across this post as I too recall being able to modify plugins a while back and I recently tried to and found out that feature is no longer available.
Thanks
04-09-2016 09:17 PM
Hey Tim,
A good place to start are the example DataPlugins in the Help system:
"Programming Reference\Object Oriented Script Interfaces\DataPlugin\Examples"
If you have SSP, you can also look at the SPOT training for DIAdem Advanced-- there's a section at the end that shows you how to program a simple DataPlugin from scratch.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-12-2016 07:58 AM - edited 04-12-2016 07:59 AM
Thanks Brad
I read through some of the examples and I have been able to successfully read channel names and columns of data from a .txt data format, by using the following commands;
Set Block = File.GetStringBlock() For i = 1 to 4 Set channel = Block.Channels.Add(File.GetNextStringValue(eString), eR64) Call ChannelGroup.Channels.AddDirectAccessChannel(channel) Next
I was wondering how one would disregard a particular element in the column block.
For example say I want to skip the first 2 data points in each column.
04-13-2016 02:55 AM
Ignoring lines: by 'read and ingore', i.e. with a loop of n repetitions of
for i = 1 to n
dummy = FileGetLine (or similar, I can't remember the precise wording)
next
you can move your file pointer to the line of interest and then follow your code.
Michael