09-03-2007 10:09 AM
09-04-2007 02:28 AM
Dim oDIAdem
Const strCanNotStart = "An error has occurred while executing the example."
'================================================================
Sub DIAdem_exec(DIAdemCommand)
'Execute the DIAdem command
Dim Exe_All, Exe_One, Exe_Type, Para
If ConnectToDIAdem Then
If oDIAdem.CmdExecuteSync(DIAdemCommand) <> 1 Then
MsgBox strCanNotStart
End If
oDIAdem.CmdExecuteSync("WndShow('SHELL','Show')")
Call DisconnectFromDIAdem
Else
MsgBox strCanNotStart
End If
End Sub
'================================================================
Function ConnectToDIAdem
'Create the DIAdem object
Dim nValueT
ConnectToDIAdem = 0
On Error Resume Next
Set oDIAdem = CreateObject("DIAdem.TOCommand")
If Err.Number > 0 then
MsgBox ("Err No " & CStr(Err.Number) & " " & Err.Description)
Err.Clear
Else
iWait = 0
Do
iWait = iWait + 1
If iWait >=10000 Then
If MsgBox("DIAdem is not responding. Try again?", vbYesNo, "Warning") = vbYes Then
iWait = 0
Else
Exit Function
End If
End If
Loop Until Not oDIAdem.bInterfaceLocked
oDIAdem.bNoErrorDisplay = true
oDIAdem.bNoWarningDisplay = true
ConnectToDIAdem = 1
End If
End Function
'================================================================
Sub DisconnectFromDIAdem
'Destroy the DIAdem object
Set oDIAdem = Nothing
End Sub
09-04-2007 03:05 AM
Hi Ingo
Using the OLE interface with ToDataSheet and ToCommand is the way I implemented the communication between my application and Diadem.
-> but this results in a very slow data transfer! ...about 2 minutes - to load the same data with a tdm file it takes about one or two second!
I need a much faster way < 5 sec.
Any idea or hint - other than implementing the data transfer using tdm files?
Thanks
James
09-04-2007 03:32 AM