Sunday, 05 February 2012
You are here: Home Creating Image Module in Niagara AX
Creating an image module in Niagara AX for QA Graphics' 3D Symbol Library PDF Print E-mail


Table of Contents

1 BUILD MODULE
1.1 CREATING THE INITIAL MODULE

2 PLATFORM DAEMON 
2.1 CREATING A PLATFORM DAEMON SHORTCUT
2.2 RUNNING THE PLATFORM DAEMON 

3 MODULE.PALETTE 
3.1 ADDING A NEW COMPONENT TO A PALETTE (MODULE.PALETTE) 
3.2 COPYING A COMPONENT TO A PALETTE 
3.3 COPYING A COMPONENT FROM A PX PAGE TO A PALETTE 

4 REFERENCES 



1 Build Module

1.1 Creating the Initial Module

Below are the procedures to create a Module within Niagara AX. It’s important to note that these procedures were done with the WorkPlace user interface. The procedures for WorkBench, ProBuilder , or other UIs should be very similar.

1. Create a folder somewhere on your workstation hosting your user interface (WorkPlace, WorkBench, ProBuilder). (i.e. C:\Niagara\QAGBASLibrary)

2. In your user interface go to Tools >> New Module.

3. Browse to the directory that you created in Step 1.

4. Name the module the same as the folder name. (i.e. QAGBASLibrary.)

ImageModuleFig1 
Figure 1.1-1

 

 

 

 

 

 

 

 

 

 

 

 

5. Fill in the remaining fields based on the information below (referenced page 137 in the docDeveloperPDF_3_2.pdf).
• name [required]: Name of the module which should match the directory name.
• bajaVersion [required]: Baja specification version number, or "0" if not a public specification.
• preferredSymbol [required]: Pick a short symbol to use as an abbreviation for the module name. This symbol is used during XML serialization.
 description [required]: A short description of the module's purpose in life.
• vendor [required]: Vendor for the module.
• install [optional]: Sets the default value of install for packages and resources. This attribute is used during provisioning to strip optional directories for headless devices. Valid values are "runtime", "ui", and "doc". The default is "runtime".
• edition [optional]: Sets the default value of edition for packages. This attribute determines which Java library edition to compile against. Valid values are "j2me", "j2se", and "j2se-5.0". The default is "j2me".

Note: The vendorVersion is not configured in “build.xml”, rather it is defined in “devkit.properties”.

6. Check the Lexicon and Create Palette checkboxes.

7. On the next screen, check the Baja Version and Vendor Version checkboxes and click Next.

 ImageModuleFig2
 
Figure 1.1-2

 

 

 

 

 

 

 

 

 

8. On the final screen, click Finish.

9. Browse to the directory where the Module is located, e.g. C:\Niagara\QAGBASLibrary, and create a directory \src\res.

10. Under the res directory, copy all the files you’d like to be added to the module.

11. Open the Build.xml file using a text editor (Wordpad, Notepad, etc.) or using the text editor in your user interface (e.g. WorkPlace, WorkBench, etc.).

12. Add the Resources section similar to the format listed below. Be sure to include the *.* to include all files under that folder.
<!-- Module Build File -->

<module
  name = "QAGBASLibrary"
  bajaVersion = "0"
  preferredSymbol = "qag"
  description = "QAG BAS Symbol Library"
  vendor = "QAGraphics"
>

  <!-- Dependencies -->
  <dependency name="baja" vendor="Tridium" vendorVersion="3.2" bajaVersion="0" />

  <!-- Resources -->
  <resources name="res/Static/Ductwork/*.*" />
  <resources name="res/Static/Boilers/Boilers_Generic/*.*" />

</module>

The directory above, res/Static/Ductwork/, can be seen below in the screen shot.


 ImageModuleFig3Figure 1.1-3

 

 

 

 

 

 

 

 

 

 

 

 

13. Once you have updated your Build.xml file, click the Save and Compile button   to save the file.

14. To get this module to show up in your user interface, you’ll need to shutdown the user interface, then run the Platform Daemon (for procedures on setting up the Platform Daemon, see Section 2.1).

15. Once the Platform Daemon has been started, open up the user interface again. Your module should now appear in your My Modules directory on your workstation. To get the module to work as a Palette in your Station, follow the steps in Section 3. Return to top.

2 Platform Daemon

2.1 Creating a Platform Daemon Shortcut

1. On the desktop of your workstation, right-click and choose New >> Shortcut.

2. In the Create Shortcut wizard, type the following into the field

C:\Niagara\Niagara-3.2.16\bin\plat.exe installdaemon
Where C:\Niagara\Niagara-3.2.16 is the directory in which your user interface is installed.

3. Click Next.

4. Name the Shortcut and click Finish. Return to top.

2.2 Running the Platform Daemon

1. Double-click the Platform Daemon shortcut on your desktop. Return to top.

3 Module.Palette

3.1 Adding a New Component to a Palette (module.palette)

You can add new components to any of your palettes that have module.palette files associated with them. A single module.palette file may be associated with each module that is stored in the modules directory. You change a module.palette file by first making the desired changes to a module.palette file that resides in a module "build" directory under your file system and then using the build process to recreate the module that includes the changed palette file.

 To add a new component to a palette (module.palette file), follow these steps:

1. Double-click on the desired module.palette file. It should be located in a module directory on your station file system.

2. The default (Wire Sheet) view appears.

3. Add a component to the wire sheet view using one of the following methods:
a) Right-click on the wire sheet view and select a new component from the New menu.
b) Drag and drop a component or container from the nav side bar directly onto the wire sheet.

4. Select File->SaveBog from the main menu.

5. From the console command line (press F3 to open console window) navigate to the working directory and type the build command followed by a space and then the name of the module folder. For example:

   C:\Niagara\Niagara-3.x.xx\workingDirectory> build moduleName

6. Press the Return key to initiate the build process. If the build is successful, the updated jar file is built and overwrites the old jar file located in the modules folder. If the build is not successful, no jar file is built and error messages are generated to help you troubleshoot the problem.

7. Refer to Section 1 for more detailed instructions about creating a module. Return to top.

3.2 Copying a Component to a Palette

You can copy components to any of your own custom palettes, store the palette files on your file system and view them in your palette side bar. The nav files must reside on the file system, not in the station database. However, the components that you add to your palette file may reside in the station database. The components that you add to your palette are copies and not connected to the original components that you are copying.

 For convenience and good organization, it is a good idea to create a "palette" folder on the file system to hold all your custom palette files.

 To copy a component to a palette, using the Wire Sheet view, follow these steps:

1. In the nav tree, double-click on the file palette file that you want to open.

2. The default (Wire Sheet) view appears.

3. From the nav side bar, palette side bar, or other source, drag and drop the desired component to the wire sheet.

4. The copied component is added to the palette file.

5. Select File->SaveBog from the main menu.

6. The palette file is updated to contain the new component.
 If the updated palette is currently being viewed in the palette side bar, you must close and reopen the palette in the palette side bar in order to see the new items. Return to top.

3.3 Copying a Component from a PX Page to a Palette
If you are unable to add or copy a component following the methods in Section 3.1 and 3.2, you can try the steps below.

1. Create a new PX file on your station.

2. Copy the components, from the Module that was compiled in Section 1, (images, etc.) to the PX file that you want to add to your palette.

3. Edit the image component as needed (e.g. add binding). For more information on adding bindings to an image component, see Section 3.4.

4. From the PX page, click the component and copy it.

5. Go to your module.palette file on your local C drive, not the module located under My Modules, and create the desired file structure within the wire sheet.

6. Paste the component that you copied from the PX page to the proper directory.

7. Repeat these steps for all components you want to copy to your palette.

8. Click the Save Bog button  to save the module.palette file.

9. Open the Build.xml file with a text editor and click the Save and Compile button to recompile the module.

10. Close the user interface and open it back up. This will update your module.
You should now be able to open the palette in your user interface. Return to top.

3.4 Adding Bindings to an Image Component

It is often desired to have a symbol pre-configured with the proper bindings to help in making the graphics development process easier. For instance, you can add a relativized binding to a boiler that would already have the animation associated with it. All you would have to do is bind that image on your Station and the symbol would work.

The procedures below take you through how to add a binding to an image. These procedures assume that you have followed the procedures in the section above and the proper images are located in the module and the module is on your Station.

1. On the Px page with your image, double-click the image to bring up the Properties.

2. In the upper right-hand corner, click the Add Binding button to add binding to the image. Be sure to add Value Binding.

3. In the Ord field, click the button and choose the Component Chooser from the Open Folder drop down.

 ImageModuleFig3.4.1
 

Figure 3.4-1

 

 

4. Browse through your Station to bind the image to a point. It doesn’t matter what point at this time, it will be relativized later. Click OK and then OK again.

Note: It is important, however, to pick a point that is the same type as the point that will be bound to the symbol (i.e. BooleanWritable, Enum, Numeric, etc.).

5. On the Properties page, right-click in the Image field and select Animate.

6. On the Animate window, select the proper image(s) from your module based on the type of point added to the image (binary, enumeration, etc.).

ImageModule3.4.2

 
Figure 3.4-2

 

 

 

 

 

ImageModuleFig3.4.3

Figure 3.4-3

 

 

 

 

 

 

 

 

 

7. Click OK once images have been added.

8. You should now be able to relativize your Ord. Click on the button to open the Ord. Relativize the Ord to something like:

slot: points/Fan$2dS (for the Fan-S point on my Station)

Click Ok and then Ok again.    Return to top.

4 References
NiagaraAX-3.2 Developer Guide 

“Creating an Image Module in Niagara AX” Blog from Niagara-Central.
 http://www.niagara-central.com/ord?portal:/blog/BlogEntry/113

 

 

Check Us Out On
facebook linkedin twitter-icon

youtube

Your are currently browsing this site with Internet Explorer 6 (IE6).

Your current web browser must be updated to version 7 of Internet Explorer (IE7) to take advantage of all of template's capabilities.

Why should I upgrade to Internet Explorer 7? Microsoft has redesigned Internet Explorer from the ground up, with better security, new capabilities, and a whole new interface. Many changes resulted from the feedback of millions of users who tested prerelease versions of the new browser. The most compelling reason to upgrade is the improved security. The Internet of today is not the Internet of five years ago. There are dangers that simply didn't exist back in 2001, when Internet Explorer 6 was released to the world. Internet Explorer 7 makes surfing the web fundamentally safer by offering greater protection against viruses, spyware, and other online risks.

Get free downloads for Internet Explorer 7, including recommended updates as they become available. To download Internet Explorer 7 in the language of your choice, please visit the Internet Explorer 7 worldwide page.