ITcPlcLibraryManager::AddLibrary
Adds a library to the PLC project. A library can either be added by its attributes (Name, Version, Company) or by its display text.
HRESULT AddLibrary(
BSTR bstrLibName,
BSTR bstrVersion,
BSTR bstrCompany
);
HRESULT AddLibrary(BSTR bstrLibName, BSTR bstrVersion, BSTR bstrCompany);
Parameters
bstrLibName |
[in] Library name. |
bstrVersion |
[in, optional, defaultvalue("")] Library version. |
bstrCompany |
[in, optional, defaultvalue("")] Company which created the library. |
Return Values
S_OK |
Library successfully added.. |
Comments
Two common ways to add a PLC library are:
- libraryManager.AddLibrary("Tc2_MDP", "3.2.0.0", "Beckhoff Automation GmbH"); // Adding library via its attributes
- libraryManager.AddLibrary("Tc2_MDP, 3.2.0.0 (Beckhoff Automation GmbH)"); // Adding library via its display name
Where librayManager is an object of type ITcPlcLibraryManager.