MapInfo Pro

 View Only
  • 1.  Using functions and subprocedures in MapBasic applications directly from MapInfo Pro

    Employee
    Posted 05-09-2018 07:11

    With MapInfo Pro v17.0 we have added an - at least to me - exciting new MapBasic function called Exec().

    The Exec() function lets you as MapBasic developer extend the capabilities of MapInfo Pro by creating custom functions and procedures with MapBasic.

    Hold on, you might say, I have been able to do that already. Yes, that's true.

    The big change with the Exec() function is that end users can now take advantage of your functions and subprocedures, for example in SQL Select statement, in SQL Update statements, in Label Expressions, Thematic Expression... basically everywhere you can use an expression.

    I wrote this article describing how to use the Exec() function in more detail and also giving you a few use cases on where to use it: The following link is no longer available. To access this information, copy the title found in the url into the search tool on the top nav bar, or try searching for key words in the post. https://li360.pitneybowes.com/s/article/How-to-take-advantage-of-the-new-MapBasic-Exec-function-in-MapInfo-Pro

    The next version of WindowHelper will give you are list of build-in functions that you can use when you have the tool running.

    How would you take advantage of the new Exec() function?



  • 2.  RE: Using functions and subprocedures in MapBasic applications directly from MapInfo Pro

    Posted 05-21-2018 11:23

    Fantastic! A long awaited feature (at least for me)! As for what I'd use this for, there are a myriad of things which are nigh on impossible in the mapbasic window e.g. find-and-replace functions, even an iff(condition,valueIfTrue,valueIfFalse) function., also logToFile() could be very helpful in large mapbasic window scripts.

    Furthemore however, this means executing Mapbasic methods is available to the MapBasic COM API which is something I am most excited about personally! Ultimately we can finally do everything a MapBasic application could via the COM API! 😁 Ribbon modifications with the MapBasic window anyone?!



  • 3.  RE: Using functions and subprocedures in MapBasic applications directly from MapInfo Pro

    Employee
    Posted 05-22-2018 03:58

    Glad to see you are as excited as I am, James 😁

    You don't have to create your own IIf() function. That was also added to MapBasic with v17.0. Read more here: The following link is no longer available. To access this information, copy the title found in the url into the search tool on the top nav bar, or try searching for key words in the post. https://li360.pitneybowes.com/s/article/How-to-use-the-new-conditional-IIF-MapBasic-function-in-MapInfo-Pro



  • 4.  RE: Using functions and subprocedures in MapBasic applications directly from MapInfo Pro

    Posted 05-22-2018 08:18

    Gosh! What else have I missed? 😅 Makes me think actually, it'd be nice if there was 1 location where you could go to find all implemented and upcoming MapBasic features. Also, in that article it says: "Because the IIf() function can return any type..." Does this mean we finally have a variant datatype too?!

    Edit: Found a list you've made previously: The following link is no longer available. To access this information, copy the title found in the url into the search tool on the top nav bar, or try searching for key words in the post. https://li360.pitneybowes.com/s/question/0D580000048jgW9CAI/will-there-be-a-mapbasic-v17



  • 5.  RE: Using functions and subprocedures in MapBasic applications directly from MapInfo Pro

    Employee
    Posted 05-22-2018 08:22

    Well, MapBasic 17.0 is not out yet.

    The PDF documents do have a comprehensive chapter on the new things in MapBasic.

    Where IIf() is a functional version of the If-End If statement, the new Cond() function can be used instead of the Do-Case-End-Case statement.



  • 6.  RE: Using functions and subprocedures in MapBasic applications directly from MapInfo Pro

    Posted 05-22-2018 08:33

    Good point. I forgot the PDF documents have a list... Well, it sounds like there is plenty to look forward to!



  • 7.  RE: Using functions and subprocedures in MapBasic applications directly from MapInfo Pro

    Employee
    Posted 06-14-2018 02:53