DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use OLE to start a Diadem vbs Script, that starts the Measurement

Hi there,
 
i try to use OLE to start a Diadem Script that start my measurement. I always get the Error-Message "The Measurement can only be startet in the first instance". How can i make this work? At this time i use DDE to start my Scripts and i want to use OLE to get direct Channel Access and to prevent the lousy dde-timeouts.
 
 

IDIACommand = CreateObject(

"diadem.tocommand")
command="Scriptstart  etc
IDIACommand.CmdExecuteASync(command)

 

 
Thanks
 
Diademi
 
0 Kudos
Message 1 of 2
(3,817 Views)
Hello diademi!
 
Depending on a registry setting DIAdem will treat the interface creation in two different ways:
  1. Starting always a new instance of DIAdem and connect to this
  2. Start a new DIAdem if there is no DIAdem already running. Then connect to the started or the already running DIAdem

The second mode will be right for your use case. Have a look at the key 'HKEY_CLASSES_ROOT\CLSID\{285E4FB2-F633-11D1-85DC-008048D9A408}\StartParameter' in the registry. The value 'Intancing' defines the behavior. Search the DIAdem help to get the definition (don't use the help index, it is missing there!).

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 2
(3,814 Views)