03-24-2010 07:31 AM
Hello.
I am looking for the name of the file in which a plugin script is written.
I need to get this filename to put it into a property in the dataportal when the plugin executes. And I need the name to update if the file containing the plugin script is renamed.
I didn't find anything in the DataPlugin.chm helpfile.
Thanks for your help.
Patrick.
03-25-2010 09:39 AM
Hi Patrick,
That's a good product suggestion, I'll pass that on. I always just declare a constant at the top of the DataPlugin VBScript and reference that whenever I need to send the name of the DataPlugin to a particular property or include it in an error message. In practice I've found it quite rare for a DataPlugin to change its name once it's been created, debugged, and deployed.
Note that if you use a DataPlugin to load data channels into the Data Portal, DIAdem automatically adds a property to each channel with that DataPlugin name. Look at the "Data source type" property name in the Data Portal's property table, and if you want to request that property programmatically, use one of the following methods:
DataPluginName = ChnPropValGet("GroupName/ChannelName", "SourceType")
DataPluginName = Channel.Properties("SourceType").Value
Brad Turpin
DIAdem Product Support Engineer
National Instruments