Tuesday 23 February 2010

For Software Developers - The NBS Annotator API

With the release of the NBS Building, NBS Engineering Services and NBS Landscape 2010 software we will also be releasing an API so that CAD software, in-house developers and hobbyist programmers can write code that can interface within the NBS specification data model.

This blog post gives a preview of what is coming up. Full documentation and sample code will be uploaded to theNBS.com in March/April 2010.

Update 31st March 2010
Download NBS Tools for free: http://www.thenbs.com/NBSTools/
Download Annotator API documentation: http://www.thenbs.com/support/annotator/

The walkthrough below is aimed at VB.Net developers, but the principles apply for C# or C++/VB6 using COM.

1. Set up references
Install the NBS Tools MSI and then reference the DLL:
C:\Program Files\NBS\NBS Tools\NBS Annotator\NBSAnnotationManager.dll

2. Associate model with specification
The user browses to an NBS specification or schedule of work:

The code below shows that an AnnotationManager object is created and then the file path for the specification is returned from the SelectSpecification() method.

 3. Annotate the model from the specification
The user annotes the model from clauses in the specification.

The code below shows that an Annotation object is returned from the SelectAnnotation() method. The Annotation object contains properties such as clause number, clause title, unique ID...

4. View technical guidance from the model
The user views technical NBS guidance and links to standards and regulations from within the model.
Note: The technical guidance may only be viewed by users with a valid NBS licence.

This is a simple method call ShowGuidance(), an Annotation object can optionally be passed as an argument to select a specific guidance page.
5. Display an annotation report
The user is about to issue the model and the specification and wants to check whether there are any errors in the annotations.
A collection of Annotation objects must be passed as arguments to the DisplayReport() method.

This is the first time we have ever released a software component for others to use, but hopefully this will be the first step in integrating data in a specification with other data models such as CAD, schedules and bills of quantities.


  1. Stephen, I apologize to contact you via a comment form, but I couldn't identify an email address. I am a graduate student in the US and am interested in following up with you regarding your PhD research. I can be contacted via the linked website.