Now that we've seen how to export the content of a station to Excel. Let's create some content from Excel.

Import your first Excel file


Create a copy of the defaultImport.xlsx file from your Workbench User Home, in the shared folder. Example: C:\Users\myusername\Niagara4.7\tridium\shared\excel\export
Create new lines in the Excel sheet and define the following content:

  • First line: we're creating a ModbusAsyncNetwork (using a variable), calling it "Modbus", put inside the drivers and creating an id to put something in it at line 2 & 3.
  • Second and third lines: we're creating a Modbus device (using again a variable), calling them respectively "Meter1" and "Meter2" and putting them inside the Modbus network we created above thanks to the id.


Now, let's import this file using the workbench tool "Active Pro Excel Import" (you need to be connected to the station you try to modify). Select the path to your file. Then hit Ok.

Since the 50.0.15.0 only .xlsx files are supported



Let's see the result in the station:


Try it yourself !

Here is the file used in the above example, with some comments inside. Download it, try importing it and see the result.
createNewContent.xlsx

Play a bit with it:

  • Create another component
  • Instead of an ID or a variable, use a standard slotPath
  • Use another template
  • Compose a slotPath using an ID or a variable


Here's a possible solution:
createNewContent.xlsx

Play with other columns


Now, let's go further. Let's create some points using the same method.


Let's add an alarm extension and an history extension inside each point. You can hide some columns for simplicity in Excel. The variables for the extensions are available in the "Variables" sheet. You can define your own Alarm extensions.


And this is the result. Pretty quick isn't it?

Try it yourself !

Here is the file used in the above example, with some comments inside. Download it, try importing it and see the result.
playWithOtherColumns.xlsx


Play a bit with it:

  • Create another component with a different Alarm and a different History than the ones in the aboves lines


Here's a possible solution:
playWithOtherColumns-solution.xlsx

Proxy extensions


Notice that we have created some "classic" points, they are not Modbus points because their proxy extension is null.

You can use instead a [short] syntax like this to define a point with a proxy:


And then call for this variable to create the point. Be careful, since the points already exist in the station, it won't replace the proxy inside, so you need to delete them before re-importing the file.


Finally you get real modbus points.

Try it yourself !

Here is the file used in the above example, with some comments inside. Download it, try importing it and see the result.
proxyExtensions-46_13_1.xlsx


Play a bit with it:

  • Create your own variable with a proxyExt
  • Use it to create a new point


Here's a possible solution:
proxyExtensions-46_13_1-solution.xlsx


Another way to define the points is to use templates as seen below.

Use of Active-Pro templates


Until now, we have been creating components defined from variables like the Modbus network, the devices and the points. It's great for simple cases but sometimes you will want to create more complex component like a device containing predefined points, or a folder containing logic etc. This is why we can use some templates. They can be anything that gets into a .bog file.

  • Templates are located in your Workbench User Home: C:\Users\{myusername}Niagara4.7\tridium\shared\excel\templates
  • They are .bog files
  • You can organize them by subfolders

Inside a .bog file you can put any component: a device, a driver, a point containing extensions...

Let's take an example with a device with four outputs.


Let's add two devices with four outputs


Since the template has points defined in there, we don't have to reference them in Excel, they are just part of the device. So you can really put anything in it.


Let's say now, you want to define the points, to give them a displayName, add tags... 

You just need to reference the device and add a line for each point.

Notice that we don't need to specify a template for the points since they already exist. We just change their display name.

The second line CREATES a component named Device1 with its children in the Modbus TCP
The following lines UPDATE components which were created in the second line.

This is the result in the station:

Try it yourself !

Here is the template needed to import the device in the file. Put it in your Workbench User Home: C:\Users\{myusername}Niagara4.7\tridium\shared\excel\templates
MyDevice.bog

Here is the file used in the above example. Download it, try importing it and see the result.
activeProTemp.xlsx


Play a bit with it:

  • Create your own .bog file with your own template, try to create a component containing other components  (for example, a folder containing a subfolder containing a NumericWritable).
  • Use it to create a new component.
  • Change one of the child components.


Here's a possible solution:

MyFirstBog.bog
activeProTemp-solution.xlsx


Now you can browse the documentation for advanced features.