#### Providing Operator Instructions Using OLE Objects with Forms

Using existing tools in conjunction with PC-DMIS can provide you with much desired functionality. For example, suppose you want to provide an operator with detailed instructions regarding part setup or measurement. One way to do this is to embed into a custom form, using the OLE object, an external file containing these instructions. Below are some examples of how to embed instructional files into forms using some common Microsoft Office tools.

These examples demonstrate how to use a Microsoft Word file and Microsoft PowerPoint file as OLE objects inside of a form to provide instructions to an operator during part program execution. They will give you a taste of things you could do with OLE objects inside of your report or form. How you put this knowledge to use for your own situation is up to you.

- Providing Instructions Using a Microsoft Word OLE Object

  #### Providing Instructions Using a Microsoft Word OLE Object

  Perhaps one of the simplest ways to provide instructions to those running your part programs is to simply use something like Microsoft Word.

  This topic and the steps below assume you have Microsoft Word installed on your computer.

  Step 1 - Create and Save the Instructions as a Word Document

  1. Create your part setup instructions inside of a Word document.

  2. Save the .doc file to a directory on your disk. Feel free to include pictures, tables, and other advanced formatting inside your .doc file. The sample doc file used for this topic looks like this:

  Step 2 - Create the Form

  1. Select View | Form Editor. The Form Editor appears.

  2. If the Edit window is open, select View | Edit window to close it giving you more screen space.

  3. Maximize the Form Editor.

  4. Size the form so that it will properly house the contents of your file.

  5. Add any other objects as desired. In the example form used for this topic, a Close Form button was added with the following properties:

     - Text = "Close Form"

     - ButtonType = OK

  When clicked, the form automatically closes.

  Step 3 - Insert the OLE Object

  1. From the Object Bar, click the OLE Object icon. Drag the object so that it fits the entire form except for a half inch margin on all sides. When you release the mouse button, the Insert Object dialog box appears.

  2. Select the Create from File option.

  3. In the File box, either type the complete pathway to the .doc file, or use the Browse button to locate it.

  4. Select the Link check box. This maintains a link between the OLE object on your form and your .doc file, so that if you later update your instructions PC-DMIS will always use the latest information.

  5. Click OK. The document is embedded into your form like this:

  6. Save the form and give it a name of your choice.

  The Insert Object dialog box is the same dialog box that appears if you choose to insert an external object into the Edit window by using Insert | Report Command | External Object. Consult the "Inserting External Objects" topic from the "Inserting Report Commands" section if you need more information on this dialog box.

  Step 4 - Insert and Test the Form

  1. Select View | Edit Window to make the Edit window visible.

  2. Select Insert | Report Command | Form. Use the dialog box to select your saved form.

  3. PC-DMIS inserts a FORM/FILENAME command block into your part program with a pathway to the form file.

  CS1 =FORM/FILENAME= <Pathway to Form File>

  PARAM/=

  ENDFORM/

  3. Mark the command block for execution.

  4. Execute the part program. When PC-DMIS reaches the FORM/FILENAME command block, it displays the form:

  5. Click Continue from the Execute Mode Options dialog box to close the form and resume execution.

- Providing Instructions Using a Microsoft PowerPoint OLE Object

  #### Providing Instructions Using a Microsoft PowerPoint OLE Object

  This topic demonstrates how to use a Microsoft PowerPoint file (.ppt) as an OLE object inside of a form to provide detailed slide-show type instructions to an operator.

  This topic and the steps below assume you have Microsoft PowerPoint installed on your computer.

  Step 1 - Create and Save the Instructions as a PowerPoint

  1. Create your part setup instructions inside of a PowerPoint file (.ppt).

  2. Save the .ppt file to a directory on your disk.

  Step 2 - Create the Form

  1. Select View | Form Editor. The Form Editor appears.

  2. If the Edit window is open, select View | Edit window to close it giving you more screen space.

  3. Maximize the Form Editor.

  4. Size the form so that it will properly house the contents of your file.

  5. Add any other objects as desired. In the example form used for this topic, a Close the Form button was added with the following properties:

     - Text = "Close the Form"

     - ButtonType = OK

  When clicked, the form automatically closes.

  Step 3 - Insert the OLE Object

  1. From the Object Bar, click the OLE Object icon. Drag the object so that it fits the entire form except for a half inch margin on all sides. When you release the mouse button, the Insert Object dialog box appears.

  2. Select the Create from File option.

  3. In the File box, either type the complete pathway to the .ppt file, or use the Browse button to locate it.

  4. Select the Link check box. This maintains a link between the OLE object on your form and your .ppt file, so that if you later update your instructions PC-DMIS will always use the latest information.

  5. Click OK. The PowerPoint file is embedded into your form.

  6. Save the form and give it a name of your choice.

  The Insert Object dialog box is the same dialog box that appears if you choose to insert an external object into the Edit window by using Insert | Report Command | External Object. Consult the "Inserting External Objects" topic from the "Inserting Report Commands" section if you need more information on this dialog box.

  Step 4 - Insert and Test the Form

  1. Select View | Edit Window to make the Edit window visible.

  2. Select Insert | Report Command | Form. Use the dialog box to select your saved form.

  3. PC-DMIS inserts a FORM/FILENAME command block into your part program with a pathway to the form file.

  CS1 =FORM/FILENAME= <Pathway to Form File>

  PARAM/=

  ENDFORM/

  3. Mark the command block for execution.

  4. Execute the part program. When PC-DMIS reaches the FORM/FILENAME command block, it displays the form and the embedded PowerPoint presentation.

  5. Double-click on the embedded presentation. The Microsoft PowerPoint software will launch and display the presentation. When it finishes, PowerPoint will close.

  6. Click Continue from the Execute Mode Options dialog box to close the form and resume execution.