开发者

How do I load data into the Data Portal of DIAdem with VBScript?

I want to load a ".tdm" file into DIAdem (National Instruments) with a VBScript but can't fi开发者_开发百科nd how to do this. I have Dialog which opens a browse-window, which returns the path as a string. So I was hoping to have a function which would work something like this:

Call Data.Root.ChannelGroups.Load(myStringWithThePath)


Just noticed I got a tumbleweed-badge on this question. Here is the solution I found last week, so if anybody cares:

Set objDialog = CreateObject("UserAccounts.CommonDialog")

objDialog.Filter = "TDM-Datei(*.tdm)|*.tdm|All Files (*.*)|*.*"
objDialog.FilterIndex = 1

boolResult = objDialog.ShowOpen

If boolResult <> 0 Then
    Call Data.Root.ChannelGroups.RemoveAll()
    Call DataDelAll
    Call DataFileLoad(objDialog.FileName)
End If
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜