The information in this post are usable with:
- VisualStudio 2017, 2019
- TE2000-HMI-Engineering 1.12.*.* (Download) and future releases
- Sources of this post: GitHub Repository
Under some circumstances it is possible that the “Beckhoff TwinCAT HMI Type Library” used by the TwinCAT HMI Automation Interface is not registered successfully. To solve this issue, just register the type library manually. The necessary tool for doing this should be already available on your machine, just search for “regasm.exe” (Assembly Registration Tool) [Microsoft Website].
Open the VisualStudio 2017/2019 “Developer Command Prompt” as Administrator:
Enter die directory “C:\TwinCAT\Functions\TE2000-HMI-Engineering\bin”.
Copy “EnvDTE.dll” to this directory: “copy ..\MSBuild\EnvDTE.dll .”
Finally we have to call “regasm.exe” to register the “TcHmiAutomationInterface.dll” and “TcHmiAutomationInterface.tlb” to allow query of Type Library information for the TwinCAT HMI Automation Interface.
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /verbose /tlb:TcHmiAutomationInterface.tlb /codebase TcHmiAutomationInterface.dll
To verify the recent call, just use “oleview.exe” to check the current system-wide type library information. A valid registration looks like this: