11.14 Using PythonAs described in the chapter DLL Interface (section 11.2) the DLLPolNavClient.dll can be used to communicate with the polarizationNAVIGATOR. Making use of this DLL is very simple if the Python-extension is used which comes with the polarization NAVIGATOR. Werecommend to copy the DLL PyPolNav.dll into your Python DLL-directory (typically named c:/Program Files/PythonXX/DLLs/). Youcan find this DLL in the directory DemoPython2.2 or DemoPython2.4depending on the Python version you are using.After having done so, you can use the extension by importing the DLLusing the following command:import PyPolNavCheck the availability of the DLL as follows (returns the version number):print "PyPolNav.dll version:" print PyPolNav.GetDLLVersion()A simple communication with the polarizationNAVIGATORTM could beas follows:print "polarization NAVIGATOR version:" printPyPolNav.SendCommand("Global","Get Version")The last error code can be read as follows:ErrorCode=PyPolNav.LastError()Note that the polarizationNAVIGATORTM has to be started prior tosending these commands. Refer to Target Names (section 11.3) for detailson the available commands. Refer to Error Codes (section 15.3) fordetails on the possible error results.You can also find a simple demo script PERTest.py located in the folderDemoPython2.2 or DemoPython2.4 showing how to use the PER appli-cation with Python.11.15 Using VBAAs described in the chapter DLL Interface (section 11.2) the DLLPolNavClient.dll can be used to communicate with the polarizationNAVIGATOR. You can directly access the DLL functions from MicrosoftVisual Basic for Applications (VBA), e.g. from EXCEL.The corresponding declarations are:Declare Function PolNav_SendCommand& Lib "PolNavClient.dll" _Alias "?PolNav_SendCommand@@YGHPBD0PADHAAH@Z" _(ByVal Target As String, ByVal Command As String, _ByVal Response As String, ByVal MaxLen As Long, _ByRef ResponseLen As Long)Declare Function PolNav_ReadResponse& Lib "PolNavClient.dll" _Alias "?PolNav_ReadResponse@@YGHHHPADHAAH@Z" _(ByVal iStart As Long, ByVal iLength As Long, _ByVal Response As String, ByVal MaxLen As Long, _ByRef ResponseLen As Long)102 A1XXX/A2XXX/A3XXX User Guide