| 08 12 | Check variant and prevent hard coding |
| 06 17 | OmniTRANS V6: RubyGems |
| 06 16 | Create a process bar |
| 06 08 | OmniTRANS V6: Speed improvements for assignments |
| 06 08 | OmniTRANS V6: Cordon assignment |
| 06 08 | OmniTRANS V6: Capacity restraint assignment for transit |
| 06 08 | OmniTRANS V6: Multiple Egress Routes |
| 06 08 | OmniTRANS V6: Network viewing and editing |
| 06 08 | OmniTRANS V6: Fast and flexible analysis |
| 06 08 | OmniTRANS V6: Ruby running as seperate thread |
With the introduction of OmniTRANS V6, OmniTRANS allow you to install RubyGems. RubyGems is the Ruby standard for publishing and managing third party libraries. For example, a RubyGem contains a script to send data to an Excel sheet.
Installing RubyGems is quite simple. First, you have to find the RubyGem which you want to use. A good start to find RubyGems is the website http://rubygems.org. This website contains more than 1000 RubyGems. Each RubyGem has a path to have to install the Gem, like the example below.
After determining which Gem you want to use, it is time to install the Gem. Therefore, we use the command prompt (Run: CMD) and navigate to ruby bin folder of the OmniTRANS installation folder (e.g. C:\Program Files\Omnitrans International\OmniTRANS 6.0.0\Ruby\bin). You can use "cd.." to navigate to a higher folder and use for example "cd program files" to navigate into the program files folder.
You have to enter the path as described on the RubyGems website like "gem install writeexcel". The RubyGem is downloaded and installed. The image below shows an example of the output.
You are now able to use the RubyGem within your Ruby jobs in OmniTRANS. Each RubyGem has a documentation page which describes how you have to use the Gem. We will demonstrate how you use the RubyGem called "writeexcel". Information about this gem can also be found on http://rdoc.info/github/cxn03651/writeexcel
You always start your job by requiring the Gem to load it.
require 'writeexcel'
Each gem has properties which can be used in your Ruby job. The code below shows how to create a new workbook with two worksheets which will be filled with some data in different styles:
require 'writeexcel'
# Create a new Excel Workbook
workbook = WriteExcel.new('ruby.xls')
# Add worksheet(s)
worksheet = workbook.add_worksheet
worksheet2 = workbook.add_worksheet
# Add and define a format
format = workbook.add_format
format.set_bold
format.set_color('red'
format.set_align('right')
# write a formatted and unformatted string.
worksheet.write(1, 1, 'Hi Excel.', format) # cell B2
worksheet.write(2, 1, 'Hi Excel.') # cell B3
# write a number and formula using A1 notation
worksheet.write('B4', 3.14159)
worksheet.write('B5', '=SIN(B4/4)')
# write to file
workbook.close
The image below shows what the created Excel sheet looks like.

This RubyGem makes is easy to write your data to Excel and even more options are available to write your OmniTRANS data to an Excel sheet.
Many more gems are available on the website http://rubygems.org.
Note that each OmniTRANS minor version (6.0.0, 6.0.2, etc.) requires a new RubyGem installation.