Bild des Benutzers devkumar chatterjee

com interface

Hi ,

 

I am trying to automate the task of inputting the values in conval control valve by using Excel com interface. I am stuck in  print procedure for printing the calculation in pdf format in a perticular folder.

will be very helpful if you can provide me with some examples.

Thanks & Regards

Devkumar Chatterjee

BASF India

Bild des Benutzers Welsch

Hi,

for printing or pdf, export use the dialog instead of the calculation interface. In fact, the calculation interface is part of the dialog interface:

Option Explicit 
Public Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 

Dim CV As COMConval10.Conval10 
Dim CVCalculation As COMConval10.Calculation 
Dim CVDialog As COMConval10.CalculationDialog 

Set CV = New Conval10           'Command to start the CONVAL-COM server 
Sleep 1000                      '1 second break to ensure that the COM server is fully started 
Set CVDialog = CV.NewDialog(1)  '1 = Control valve 
Set CVCalculation = CVDialog.Calculation 
CVCalculation.CalculationData.ParamByName("t1").Value = 10
...
CVDialog.CreatePdf(<filename>)

Best Regards
MW