wdstarr

GetPiModueFromPath(Context) returns 'Nothing'

Discussion created by wdstarr on May 23, 2014
Latest reply on May 28, 2014 by wdstarr

I am fairly new to the ACE SDK, and definitely new to the forums. I do have some other modules running, this is the first time trying to access anything but PI Tags.

 

I am attempting to migrate the initialization of some heavy duty ACE calculations that are initialized and maintained as PI Tags to AF Attributes. I used Andreas' code sample as a starting point, http://vcampus.osisoft.com/bloggers_place/b/andreas/archive/2012/08/17/using-the-pi-af-sdk-from-pi-ace.aspx. After many travails with compiler options, dll's, 32/64 bit, and 'SupportedRuntimeVersions'; I now have an ACE module that compiles without error and launches in the debugger.

 

In stepping through the debugger it is not very far into the code before I know there is no need to go further.

 

Protected Overrides Sub InitializePIACEPoints()

 

' User-written module dependent initialization code
'
Protected Overrides Sub ModuleDependentInitialization()
Dim myModule As PISDK.PIModule

myModule = PIACEBIFunctions.GetPIModuleFromPath(Context) '''' returns nothing

 

Try
' connecting to the PI system

 

I am running on a Server 2008 (R2) x64. All the development environment is hosted on the same system. Using Visual Studio 2012.

 

Modules loaded at start::

 

'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Program Files (x86)\PIPC\ACE\Scheduler\x86\PIACEClassLibraryHost.exe'
'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\OSISoft.PIACENet\2.1.50.4__38c1410a641dcae4\OSISoft.PIACENet.dll', Symbols loaded.
'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_32\OSIsoft.PISDK\1.4.0.0__c3309f0734ba2805\OSIsoft.PISDK.dll'
'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_32\OSIsoft.PISDKCommon\1.4.0.0__c3309f0734ba2805\OSIsoft.PISDKCommon.dll'
'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\CustomMarshalers\v4.0_4.0.0.0__b03f5f7f11d50a3a\CustomMarshalers.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Program Files (x86)\PIPC\ACE\ClassLibraries\AFSDKTest\bin\Debug\AFSDKTest.dll', Symbols loaded.
'PIACEClassLibraryHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\OSIsoft.AFSDK\v4.0_4.0.0.0__6238be57836698e6\OSIsoft.AFSDK.dll'

 

No bets, but I think I am likely overlooking something simple.

 

Dave

Outcomes