jimahev

Calling PISteamTable function in VB.Net

Discussion created by jimahev on Jul 4, 2011
Latest reply on Jul 5, 2011 by andreas

Hi,

 

I am using MS Visual Studio 2010 VB.Net environment. I am having trouble calling the PISteamTable function in my ACECalculation. The debug error code I am getting is as below;

 

System.Runtime.InteropServices.COMException was unhandled by user code

 

  ErrorCode=-2147221164

 

  Message=Retrieving the COM class factory for component with CLSID {8B085309-7457-46E3-926F-D2B7644BE1B0} failed due to the following error: 80040154.

 

  Source=Performance

 

  StackTrace:

 

       at PIACE.Performance.U1_Turbine.ACECalculations() in C:\Program Files (x86)\PIPC\ACE\ClassLibraries\Performance\U1_Turbine.vb:line 326

 

       at PIACEClassLibraryHost.PIACEHost.PIACENetSchedule..ctor(String ServerName, String PIACEClassLibraryName, String ACEModuleName, String ACEContext)

 

  InnerException: 

 

 

 

I already add the PISteamTable COM reference in my project. My ACECalculation code is as below;

 

 

 
    Public Overrides Sub ACECalculations()

        Dim objST As New PISTEAMTABLE.PISTFunctions

        Dim ATM As Double = 103.25 'kPa

        'Heat Balance Calc

 

        'LPH-3

        Dim U1_LPH3_Wtr_In_Press As Double

        U1_LPH3_Wtr_In_Press = U1_GSC_In_Press.Value - 3 * ((U1_GSC_In_Press.Value - U1_LPH3_Wtr_Out_Press.Value) / 4)

        Ace_Test.Value = objST.StmSI_HPT(U1_LPH3_Wtr_In_Press * 100, U1_LPH3_Wtr_In_Temp.Value)

    End Sub

 

 

 

 

Appreciate any help to solve my problem.

 

 

 

Thank you.

 

 

 

Regards,

 

Rizaidi

Outcomes