BabaCAD as a new target for developers

There is a new section at BabaCAD homepage, Developers section: http://www.babacad.com/developers

You can visit Developers section to learn how to write your own extension modules for BabaCAD (.bem). It’s very easy to share .bem modules between users, as .bem files just have to be copied to BabaCAD/ExtensionModules folder (BabaCAD install folder is in \Program Files\BabaCAD directory). BabaCAD application will automatically load all .bem modules from this folder at the start time.

LISP module, which is the first developed .bem module for BabaCAD, shows many features programmed to extend functionality of BabaCAD software. Microsoft Visual Studio 2010 is only requirement to start programming applications for BabaCAD. BabaCAD v1.3 installs include headers and lib files of BabaCAD Extension API. It can be found in \Program Files\BabaCAD\BabaCAD\API directory.

Read Developers section and you will find example of SLOPE command inside Civil Tools extension for BabaCAD. Full visual studio c++ project (.sln) is there (in zip file). I recommend everyone to use this as a template for theirs new .bem projects. There is necessary entrypoint function of extension API and also some other API functions (for example AddCommand function adds new command to BabaCAD runtime).

I will try to add more examples. Also, I will add a new topic at BabaCAD forum for developers to ask questions and submit comments.

 

 

 

3 thoughts on “BabaCAD as a new target for developers

  1. 1>—— Erstellen gestartet: Projekt: CivilTools, Konfiguration: Release Win32 ——
    1> stdafx.cpp
    1> CivilTools.cpp
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(24): error C2065: ‘shared_ptr’: nichtdeklarierter Bezeichner
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(24): error C2275: ‘BcDbBlock’: Ungültige Verwendung dieses Typs als Ausdruck
    1> \Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(20): Siehe Deklaration von ‘BcDbBlock’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(24): error C2974: “std::vector”: Ungültiges template-Argument für “_Alloc”, Typ erwartet.
    1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(655): Siehe Deklaration von ‘std::vector’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(24): warning C4091: ‘typedef ‘: Ignoriert auf der linken Seite von ‘std::vector’, wenn keine Variable deklariert wurde
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(24): error C2143: Syntaxfehler: Es fehlt ‘;’ vor ‘>’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(24): error C2059: Syntaxfehler: ‘>’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(25): error C2065: ‘shared_ptr’: nichtdeklarierter Bezeichner
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(25): error C2275: ‘BcDbObject’: Ungültige Verwendung dieses Typs als Ausdruck
    1> \Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(21): Siehe Deklaration von ‘BcDbObject’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(25): error C2974: “std::vector”: Ungültiges template-Argument für “_Ty”, Typ erwartet.
    1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector(655): Siehe Deklaration von ‘std::vector’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(25): warning C4091: ‘typedef ‘: Ignoriert auf der linken Seite von ‘std::vector’, wenn keine Variable deklariert wurde
    1> with
    1> [
    1> _Ty=int
    1> ]
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(25): error C2143: Syntaxfehler: Es fehlt ‘;’ vor ‘>’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(25): error C2059: Syntaxfehler: ‘>’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(276): warning C4244: ‘return’: Konvertierung von ‘double’ in ‘float’, möglicher Datenverlust
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(277): warning C4244: ‘return’: Konvertierung von ‘double’ in ‘float’, möglicher Datenverlust
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(278): warning C4244: ‘return’: Konvertierung von ‘double’ in ‘float’, möglicher Datenverlust
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(279): warning C4244: ‘return’: Konvertierung von ‘double’ in ‘float’, möglicher Datenverlust
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(293): warning C4244: ‘Initialisierung’: Konvertierung von ‘double’ in ‘float’, möglicher Datenverlust
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(420): warning C4244: ‘Argument’: Konvertierung von ‘double’ in ‘float’, möglicher Datenverlust
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(687): error C2146: Syntaxfehler: Fehlendes ‘;’ vor Bezeichner ‘Objects’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(687): error C4430: Fehlender Typspezifizierer – int wird angenommen. Hinweis: “default-int” wird von C++ nicht unterstützt.
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(710): error C2146: Syntaxfehler: Fehlendes ‘;’ vor Bezeichner ‘Objects’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(710): error C4430: Fehlender Typspezifizierer – int wird angenommen. Hinweis: “default-int” wird von C++ nicht unterstützt.
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(725): error C2061: Syntaxfehler: Bezeichner ‘DbBlockArrayType’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(737): error C2143: Syntaxfehler: Es fehlt ‘;’ vor ‘\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(737): error C4430: Fehlender Typspezifizierer – int wird angenommen. Hinweis: “default-int” wird von C++ nicht unterstützt.
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(737): error C2238: Unerwartete(s) Token vor ‘;’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(738): error C2143: Syntaxfehler: Es fehlt ‘;’ vor ‘\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(738): error C4430: Fehlender Typspezifizierer – int wird angenommen. Hinweis: “default-int” wird von C++ nicht unterstützt.
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(738): error C2238: Unerwartete(s) Token vor ‘;’
    1>\Program Files (x86)\BabaCAD\BabaCAD\API\Inc\BabaCADExtensions.h(805): warning C4018: ‘CivilTools.cpp(412): warning C4018: ‘<': Konflikt zwischen 'signed' und 'unsigned'
    ========== Erstellen: 0 erfolgreich, 1 fehlerhaft, 0 aktuell, 0 übersprungen ==========

  2. Hej!

    I tried to run your developer description for writing an babaCad extension.

    Unfortunately, I have Windows 10 with visual studio 2012 and your tutorial is written with visual studio 2010. anyway, i could not compile your provided zip.

    Is there any chance to create an easy extension? for the moment, i’m just failing on your developer tutorial during import babacad-lib in step #4.

    Then I tried your provided code: Here’s my Compiler Note

    • You must use Visual Studio 2010 to develop extensions for current BabaCAD version (v1.3.4) and that’s why you can not import babacad.lib (it’s compiled with c++ vs 2010 compiler). There is no other solution to develop .bem modules for now. I hope next release of BabaCAD will be compiled with 2012 visual studio.

      Regards,
      Mirza

Leave a Reply to admin Cancel reply