OPC Studio User's Guide and Reference
Importing Type Libraries to Delphi
Client and Subscriber Development > Development Fundamentals > Referencing the Components (COM) > Importing Type Libraries to Delphi

Use the steps below to import QuickOPC-UA for COM type libraries to Delphi XE7, Delphi XE8 or Delphi 10 Seattle.

Note, however, that for the purpose of our examples, we already ship Delphi (XE7) components created from importing QuickOPC type libraries together with the examples. It may be faster and safer to simply reuse them. They are located in the “Imports” subdirectory under the Delphi examples directory (Examples-COM/OP/Imports relatively from the QuickOPC installation folder).

  1. In Delphi, select command Component -> Import Component. The first page of the “Import Component” wizard appears, titled “Type of Component”:

    Select “Import a Type Library” and press the Next button.

  2. The page “Registered Type Libraries” appears:

    You may need to resize the form to make it larger, and/or drag the column header dividers to make the columns wider.

    Type OPC into the search box, in order to narrow down the list of available type libraries. Select the type library you want to import, and press the Next button.

  3. The page “Component” appears:

    Check the “Generate Component Wrappers” box, and optionally modify the other settings as needed. Then, press the Next button.

  4. The page “Create Unit” appears:

    Select the option you need (typically, you can leave the “Create Unit” choice selected), and press the Finish button.

  5. If you need to import another type library, repeat the process from Step 1.

           

    Note that importing a type library may also silently regenerate (and overwrite) an existing imported component that the type library depends on, but then without the “Generate Component Wrappers” option – potentially messing things up. To avoid this, you can either

    1. make backup copies of existing components before importing any new type library, and restore the overwritten components afterwards, if needed

      or

    2. import the type libraries in the reverse order of layering, starting with those that are at the top of the hierarchy and proceeding downwards:
      1. OPC Labs EasyOPC Forms
      2. OPC Labs EasyOPC-UA Components Library
      3. OPC Labs EasyOPC-UA Library
      4. OPC Labs EasyOPC "Classic" Components Library
      5. OPC Labs EasyOPC "Classic" Library
      6. OPC Labs EasyOPC "Classic" Core Library
      7. OPC Labs Base Library Forms
      8. OPC Labs Base Library Components
      9. OPC Labs Base Library

      or

    3. if possible, simply use the pre-imported components that come with our examples, as described above.
    See Also