MapInfo Pro

Expand all | Collapse all

Is there a mapbasic command to set preferences?

  • 1.  Is there a mapbasic command to set preferences?

    Posted 12-20-2018 01:59
    Hello all,

    Is there a mapbasic command to set preferences?
    Things like default directories and default projection.
    In my organisation, it would be nice to run something to get everyone set up consistently.
    We could simply replace the user's PRF file. But that would alter every single preference at once, instead of just the chosen preferences.


    ------------------------------
    Nick Lawrence
    Mr
    TMR-Policy and Planning
    Brisbane
    ------------------------------


  • 2.  RE: Is there a mapbasic command to set preferences?

    Pitney Bowes
    Posted 12-21-2018 07:27
    Edited by Bill Wemple 12-21-2018 07:28
    Hi Nick
    No, setting of MIPro application preferences has never been allowed via MapBasic addins or other means, and probably never will be allowed.  Only UI interaction to set preferences for MIPro  itself is allowed.  Setting of preferences via MapBasic or other addins could unknowingly change default behaviors of MIPro and potentially cause  damage or loss of data to users who are unaware expected preferences had been altered via an addin.
    e.g.: If an addin were to turn off  the preference for prompt to save workspace on close, users could lose a lot of valuable work later on unexpectedly after running an addin that changed it without their knowledge.
    MapBasic apps should be able to set their own 'preferences' to be valid for the session while that addin is running without having the need to alter MIPro application preferences pretty much by just assigning path and coordsys strings  to string variables, etc.
    There is also a Workgroup installation  process that can be performed where users share the  applicaiton data files  from a centralized location if they choose.
    MapInfo Engineering is also working on updating  the MapBasic GetPreference() function to get all the current MIPro preference settings so  users can make a decision in their addins on what they want to use for setting variables for different behaviors within that addin.

    Regards,
    -Bill

    ------------------------------
    Bill Wemple
    Principal QA Engineer
    Pitney Bowes
    Troy, NY
    ------------------------------