While the PC-DMIS Basic Script Editor has its uses, it doesn’t have a lot of the visual syntax and other programming aids that are available in other common programs that also support automation.
The Object Browser, available in standard Visual Basic Editors, is essential to getting the proper help when writing automation scripts. It contains all the different objects for any library you have chosen to use in your automation project.
To set up the object browser with the appropriate libraries, do the following:
-
Open Visual Basic (or you can open the VB editor that ships with MS Word or MS Excel)
-
In Visual Basic, select the References menu item. In VB5 this is Project | References. (In Excel or Word’s VB Editor, select Tools | References).
-
The References dialog box appears. Items that are checked are libraries already included currently.
-
Scroll down to PC-DMIS X.X Object Library (where X.X is your library version type that matches the version of PC-DMIS you want to automate, and select the check box.
-
Click OK.
-
Access the Object Browser (press F2 within the VB Editor). In the list at the top it should say <All Libraries>. From the list, select the PCDLRN library.
You can now browse through all the objects and view their properties, methods, and events. Most of the objects have properties and methods in the PC-DMIS object library. Only a few objects have events.
Additionally, when writing code, your Visual Basic Editor will now contain the visual syntax aids for the various PC-DMIS objects and commands.