I would like to enquire about some functionalities of MapInfo raster libraries for Python. If I understand the problem correctly, the library is using Pythonnet to interface with the .NET binaries. When I use the library (by executing the script using ctrl+U in MapInfo application), every module I require gets loaded without issues.
However, When I use these libraries in conjunction with the frontend python library (in order to be able to bind the script to a button in MI Pro), upon opening the application (I am trying to register the addin to load along with the MI Pro app), an exception occurs while attempting to load the raster libraries:
(Main: 1666: (pylayouttemplate.mb:70) Unhandled exception in external method (Exception): FileNotFountException : Unable to find assembly "MapInfo.RasterEngine" at Python.Runtime.CLRModule.AddReference(String name))
However, if I load the original script that only handles the computation itself (not the buttons) first, the addin then loads without issues as well.
Is there anything that I'm missing? My goal is for the addin to register upon MI startup. I am attaching the code if you'd like to run the script on your device.
Thank you for your assistance,Michael Roth, CSmap