The NPBuilder application supports the use of external plugins which can add functionality to the application. Plugins could be used for conversion dialogs which may import a motor controller command set in one command language (ie. GCode) and then translate into another (ie. Commander Ascii). Another use for Plugins could be for code generation from NPBuilder Code Blocks to a specific programming language (ie. Visual Basic).

Currently Plugins can be developed using the Powerbasic ( see:Powerbasic.com  ) programming language. Powerbasic is a Basic language compiler for Windows with a syntax very similar to Microsoft QuickBasic. It generates native code 32 bit DLL's and EXE's for Windows.  Powerbasic has the raw power of C and can generate applications with similar performance as C. The compilers String command set is one strongest reasons it is an excellent tool for writing plugins for NPBuilder. Unlike C which uses a zero terminated strings, Powerbasic uses the Windows OLE API's for variable length string variables which do not require a zero terminator and can hold binary data in the string. The string variables can also be huge in size and do not need to have a maximum size defined at creation like C does. Powerbasic can easily handle strings to store very large amounts of data. Powerbasic also appends at the end of each string variable a zero terminator just in case you want to pass a pointer to the string to an external library (DLL) which expects a C string instead. Powerbasic variable length strings are of the type BSTR in C. BSTR's apparently are not used much in C except for COM objects, so many C programmers may not be familiar with them. Powerbasic also supports C like features such as Pointers, which is required for building plugins for NPBuilder.

For more info about BSTR's in C see the following:

What is a BSTR

How to create and then free a BSTR

In this document all code examples will be for Powerbasic. Plugins can be written in other programming languages, such as C and C examples and header files will be provided in future editions.

Here is an example of one Plugin which comes with NPBuilder:

Plugins can be designed completely from scratch in Powerbasic, but to make it easier to get started writing plugins the NPBuilder application provides a simple Visual Designer so you can design your plugin visually and then generate source code for it. Once the initial code template is generated then all changes to user interface features in your plugin must be hand coded from here on.

You can access the NPBuilder Plugin Designer from the Tools Menu from the main menu: