Proton BASIC Compiler - Writing Plug-ins for the Mecanique IDE

  • 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)

    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.

    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.

    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.


    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.

  • Recent Activity


    Negetive Numbers with minus sign

    Thread Starter: amod

    Hi, Iam making a load indicator with HX711.My Problem is with negetive numbers and minus sign.Iam using 4 digit seven segment display.fourth display...

    keytapper Today, 06:40 Go to last post

    CWrite and ISR

    Thread Starter: joesaliba

    I am struggling to make work CWrite and Interrupt together. If I comment out: - On_Interrupt Isr ' Where to go on an Interrupt ...

    keytapper Today, 05:44 Go to last post

    Sleep and how to use it

    Thread Starter: Tim

    Hi, I need to save power in a device (16f1823) so thought, sleep a lot. But I never really used the command before. Reading the data sheet I...

    towlerg Today, 14:16 Go to last post