• PicŪ Basic


  • Writing Plug-ins for the Mecanique IDE

    By John Barrat




    The Plug in system in the Mecanique - IDE is a powerful tool. Users can now add their own plug-ins to perform simple tasks to complex project management. The provided interface is via DLL calls, with the examples being written in DELPHI. Those of you more fluent in VB will be delighted to hear that JohnB from the Forum has worked hard writing the aliases so they can now be accessed easily in VB.
    The original files from Mecanique along with examples and explanations of how they work can be obtained directly from Mecanique HERE
    An IDE un-packer has been written and is available HERE
    Please read these notes found on the Forum HERE and HERE (These notes are no longer available)
    Tim

    I have been playing around with the API interface using Visual Basic. The end result is that I can now connect to the API and can pick up API events through a call back procedure. Full details are included in the attached ZIP files.

    PDS_IDE_API.zip

    All the declarations have been converted into VB style declarations. The constants and type definitions are saved in a text file which can be read by the API Viewer which comes with VB (APIload.exe). To use it, open the file PDS_IDE_API.txt with the API viewer and choose from Declarations, Constants or Types and you will get a list of all the available items in that category. You can select items and copy them into your application.

    (I was going to distribute it with this package but I guess Microsoft would not take kindly to that).

    A word of caution about these declarations. I believe they are reasonably accurate but I have not checked each one in turn. I can confirm that the Connect, Disconnect and IsConnected declarations are correct and I used the same method to translate all the others.

    PDSplugInInterface.zip

    This is a small demo program that simply connects to the API and reports events as they happen. Install it like you would any other Plug-In and select it from the Plug-In menu.

    To check out its operation try opening up a few files and tabbing between them, you will see messages appearing in the list box on the demonstrator. Note the messages appear with the most recent at the top of the box.

    Callback Demo.zip

    This is the source code for the demo with full commenting.

    I hope it proves useful - please let me know if you have any problems with it or if you spot any errors in the documented declarations.

    Happy Plug-In Development.

    JohnB