Include Your Own Widget in Project Assist

By editing the widget libraries used by Project Assist 2.0, you can make your own widgets available in Project Assist. This technique is intended for Project Assist users who are also familiar with DGLux5. Adding your own widgets requires you to use symbols, dataflow, and project directories in DGLux5.

Important

If your Project Assist 2.0 template becomes damaged, you can download and import a new copy of the template.


Include a Simple Callout Widget in the HVAC Widgets

These steps show you how to create a simple callout widget and include it in the Project Assist HVAC widgets. You can do these steps as a tutorial before attempting to add more complicated widgets.

Create the Symbol in DGLux5

First, you will create a simple symbol to use as a widget.

In these steps, you will create a symbol with parameters, and you will bind one of the parameters to a property.

  1. Start a new DGLux5 project and page.
  2. Right click the Stage in the Document window or Outline, and select Insert > Components > Text.

  3. In the Property Inspector, style the appearance of the text component using the fill and stroke and text and font properties.

  4. In the Outline, right-click the text component, and select Convert to Symbol.

  5. Name the symbol simpleCallout, and click OK.

  6. In the Symbols panel, right-click simpleCallout, and select Edit.

  7. In the Outline, right-click simpleCallout, and select Edit Properties.
  8. Add a textarea property by dragging it to the right-hand panel.

  9. Double-click the textarea parameter, and rename it label.
  10. For the value of the label parameter, add some placeholder text, such as 71° F.
  11. Bind the label parameter to the Text property.

  12. Click OK to exit the symbol editing mode.

  13. Save the page.

Include the Widget in the HVAC2 Library

In order to include your widget with the Project Assist 2.0 HVAC widgets, it must be added to two libraries. The first of these is the HVAC2 library.

In these steps, you will add a widget to a widget library.

  1. In the page where you created your symbol, in the Symbols panel, right-click simpleCallout and select Copy.

  2. Select Project > Open Project, and open the project named HVAC2.
  3. In the Project panel, expand the palette directory, and open Equipment.dg5.

  4. In the Symbols panel, right-click and select Paste to paste the symbol.

  5. In the Outline, right-click the Stage, and select Insert > Components > Symbol.

  6. With the symbol instance selected in the Outline, click Bring to Front to move the symbol to the front so that you can see it quickly for testing purposes.

    This moves the symbol to the top of the Outline.

  7. With the symbol instance selected in the Outline, for the Symbol property, type simpleCallout.

  8. Save the page.

The symbol appears on the page, and in the widgets palette under HVAC2, in the Equipment category.

Include the Widget in the HVAC PA2 Library

After you have included a widget in the HVAC2 library, you must also include it in the HVAC PA2 library in order for it to appear in Project Assist.

In these steps, you will copy and paste a Dataflow block and bind from a table cell to a property.

  1. Select Project > Open Project, and open the project named HVAC PA2.
  2. In the Project panel, expand the palette directory, and open Equipment.dg5.

  3. In the Outline, right-click the Stage, and select Insert > Components > Symbol.

  4. With the symbol instance selected in the Outline, click Bring to Front to move the symbol to the front so that you can see it quickly for testing purposes.

  5. With the symbol instance selected in the Outline, for the Symbol property, enter lib/HVAC2/palette/Equipment:simpleCallout.

  6. In the Outline, next to another symbol, click Dataflow.

  7. Click the green bar of the PABinding block to select it. Then, right-click the block and select Copy.

  8. Right-click your symbol and select Dataflow to open the dataflow, and then paste the PABinding block.


  9. Select the PABinding block, and then click the button next to data to open the table.

  10. Scroll right until you see the vFormatted table column.
  11. Drag the cell (not the heading) in the vFormatted table column to the label property of your symbol.

    Tip

    You could drag the cell from some other column to change what appears in your widget.

  12. Save the file and close.

Test Your Widget

After you have added a widget to the HVAC widgets in Project Assist 2.0, test your widget to make sure that it works.

  1. Open your Project Assist project, and open the home page of Project Assist in the Viewer.
  2. Make sure you have some device node created.
  3. Click the gray or white button to start editing the template for a device.
  4. At the bottom of the screen, expand Equipment, and drag your widget to the device template.
  5. Open the bindings tree, and drag some point to your widget. If your widget was created correctly, it updates with the value at the point.

Tip

  • Instead of Equipment.dg5, use a different HVAC category in both HVAC2 and HVAC PA2, to insert your widget in a different category.

Include a Simple Widget in the Project Assist Widgets library

Instead of including your simple widget in the Project Assist HVAC widgets, you can include your widget with the other Project Assist widgets such as callouts, lists, and charts. This has the benefit of making your widget available for location pages and reports as well as device templates.

  1. Create a symbol as described above.
  2. In the page where you created your symbol, in the Symbols panel, right-click simpleCallout and select Copy.

  3. Select Project > Open Project, and open your Project Assist project.
  4. In the Project panel, open palette/widgets.dg5.

  5. In the widgets.dg5 file that you just opened, follow steps 4–8 from Include the Widget in the HVAC PA2 Library.
  6. Test your widget as described above, in both a device template and a location page.