Beginners guide to creating your own Open Plan add-ins.

With our teams in lockdown or working from home in general, we here at GBA have had a little time to focus on some simple solution development projects for clients. One in particular involving Deltek Open Plan.

Open Plan is a very robust planning package which provides an access layer for software developers to hook into. Using Microsofts OLE (Object Linking and Embedding) libraries, programmers can provide Open Plan users with custom solutions using data from Open Plan directly.

With many of us working from home and wanting to learn something new, here's a simple article that demonstrates how to write a simple script and provide access to the script from Open Plan.

The Ribbon

Firstly lets start by looking at the Open Plan Add-ins Ribbon:

AddinsRibbon

The ribbon itselft is broken into groups containing links to tools and utilities. The layout, group names, buttons and labels are all controlled via Open Plan's Addins.dat file, located in the root installation directory for the software.

Addins.dat File

The Addins.dat file is a text file containing lines of script to allow users to add custom tools to Open Plan. Clicking on the Edit Addins.dat button opens the Addins.dat file for editing:

addins

Each line of the script contains numerous commands contained within strings that provide Open Plan with information on how to pass project data to the utility or tool being executed. Each string contains a description, location of the file, and parameters.

In the above example we have defined "Tool12" which will point to our custom script:

; My Custom Stuff
Tool12=My Stuff:Hello World;wscript.exe "C:\Users\Home\Downloads\HelloWorld.vbs"

The command tells Open Plan to Add a new Tool called "Hello World" to the "My Stuff" group and use Windows Script Host (wscript.exe) to run the HelloWorld.vbs file.

On saving and Reloading the Add-ins ribbon we are presented with a button to our new Hello World script!

AddinsRibbon Updated

Our Script

For our example we developed a simple Visual Basic Script (vbs) to provide a simple dialog box. The script is as simple as:

MsgBox "Hello World!"

This text is saved as a VBS file from Notepad to the location specified in the command above.

On clicking the button from Open Plan, our script fires:

helloworld

Paremeters

Of course by this point a simple dialog box is not going to be much use for us so lets improve our script a little.
Open Plan allows users to specify key parameters which can be used to pass key variables to your scripts. All of these parameters are listed in the Open Plan Developer's guide.

Lets modify our Addins.dat file to include a parameter:

; My Custom Stuff
Tool12=My Stuff:Hello World;wscript.exe "C:\Users\Home\Downloads\HelloWorld.vbs" %P

Here we are passing the project name to the script. Now lets adjust our script slightly. We update it as follows:

code

When we now run this tool from Open Plan we are prompted with some more meaningful information:

resultdialog

 

Conclusion

Whilst most of us will only use the default "out of the box" functionality that Deltek Open Plan provides, sometimes we may need custom solutions to help go that lifftle bit further in our planning or analyses. Open Plans default installation folder contains lots of sample code that can be used to help kick-start your lockdown coding learning.

Happy programming!

Find out how GBA Projects can help your project perform.

Contact us.

Clients

  • 01-santos-logo.jpg
  • 02-bhp-logo-new.jpg
  • 03-hansen-logo.jpg
  • 04-sydney-water.jpg
  • 05-beach-energy.jpg
  • 05-kbr-logo.jpg
  • 06-aurecon-logo.jpg
  • 08-riot-tinto-logo.jpg
  • 09-sa-govt-logo.jpg
  • 10-spotless-logo.jpg
  • 11-built-environs-logo.jpg
  • 12-dyno-logo.jpg
  • 13-sa-power-logo.jpg
  • 14-incitec-logo.jpg
  • 15-electranet-logo.jpg