To use an OCX file in LabVIEW, first make sure your Active X Control is registered
on the system. Please note that the ActiveX class and the LabVIEW development environment should have the same bitness. For example, if you installed a 32-bit ActiveX library you should call it with LabVIEW 32-bit. LabVIEW 32-bit cannot load a 64-bit ActiveX object into an ActiveX container because a 32-bit process cannot load a 64-bit process and vice-versa.
Follow these steps to use your ActiveX library file in LabVIEW:
- Open the Controls Palette and select .NET & ActiveX >> ActiveX Container.
- Right-click the container and select Insert ActiveX Object.
- Select the desired OCX file from the list. The OCX file will appear in the list once it has been registered with the operating system.
- To access the properties and methods of an OCX, simply create a Property Node or an Invoke Node by right-clicking the output terminal of ActiveX Control on the block diagram and selecting Create >> Property for Class or Create >> Method for Class.
OLE Control Extension (OCX) files are a custom file format which typically contain ActiveX custom controls. These files can be used to create and interact with custom controls in applications which support ActiveX and allow customization and reuse of user interface designs.
ActiveX containers also have an option to create an ActiveX object from a file. The "Create Control" drop down menu has an option for "Create Object From File"