MapInfo Pro

Expand all | Collapse all

Keyboard shortcut to make currently selected table editable

Jump to Best Answer
  • 1.  Keyboard shortcut to make currently selected table editable

    Posted 01-30-2019 23:17
    Is there a keyboard shortcut to make the currently selected table the editable table, without having to go to the layers panel and choosing the pen icon. In the list of codes  I can't find one - I am using 17.2

    https://support.pitneybowes.com/servlet/fileField?entityId=ka180000000CmeiAAC&field=Attachment_2__Body__s

    ------------------------------
    George Corea
    Knowledge Community Shared Account
    Shelton CT
    ------------------------------


  • 2.  RE: Keyboard shortcut to make currently selected table editable
    Best Answer

    Posted 01-31-2019 05:43
    Edited by Emma Daniel 01-31-2019 19:01
      |   view attached
    Hi George, we wrote an article on Keyboard Shortcuts which may be useful:
    MapInfo Keyboard Shortcuts

    Perhaps number 821 - MakeSelectionEditable - from the Command Editor Tool?

    ------------------------------
    Emma Daniel
    CDR Group
    HOPE VALLEY United Kingdom
    ------------------------------

    Attachment(s)



  • 3.  RE: Keyboard shortcut to make currently selected table editable

    Posted 01-31-2019 19:01
    Edited by George Corea 01-31-2019 19:13
    Brilliant -thank you.

    Is there a way to run a series of commands with one shortcut. For example Make Editable (821/Alt+R) and then if a line Reshape(Ctrl+R) -can be say ctrl+alt+r as one command?

    ------------------------------
    George Corea
    Knowledge Community Shared Account
    Shelton CT
    ------------------------------



  • 4.  RE: Keyboard shortcut to make currently selected table editable

    Posted 02-01-2019 09:34
    That would be a really advanced bit of Mapbasic programming and I'm not even sure it's possible. You could possibly have a MapBasic tool that when clicked made the selection editable and then followed an 'if it's a line, do this' 'if it's not a line do that'  but I don't think you can run a MB tool from a hotkey and I don't think you'd want to anyway. Perhaps Peter Moller or another PB expert knows?

    The easiest way to achieve what you're after is to set up your own custom Map Toolbar when you Right Click which features both the Make Selection Editable tool icon and the Reshape icon. You can do this by going to the drop down on the Quick Access Toolbar (above the ribbon) and choosing More Commands.

    ------------------------------
    Emma Daniel
    CDR Group
    HOPE VALLEY United Kingdom
    ------------------------------



  • 5.  RE: Keyboard shortcut to make currently selected table editable

    Posted 02-01-2019 10:00
      |   view attached
    Emma is right. You would need to create a small custom MapBasic tool to do this.

    Load the tool and assign a dedicated hotkey to the controls that the tool is adding to the interface.

    Here is an example that will work using Ctrl+H:

    Include "MapBasic.def"
    Include "Menu.def"

    Declare Sub Main
    Declare Sub Endhandler
    Declare Sub DoTheStuff

    Sub Main
       Alter Menu ID M_TOOLS Add
          "Make Selection Editable and Turn on Reshape/W^H"
          Calling DoTheStuff
    End Sub

    Sub DoTheStuff
       Run Menu Command M_MAP_MAKE_SELECTION_EDITABLE Run Menu Command M_EDIT_RESHAPE

    End Sub
    Sub Endhandler
    End Sub


    I have also attached the source code and the compiled application (compiled for v17.0)



    ------------------------------
    Peter Horsbøll Møller
    Pitney Bowes
    ------------------------------

    Attachment(s)

    zip
    RunMultipleCommands.zip   915B 1 version


  • 6.  RE: Keyboard shortcut to make currently selected table editable

    Posted 02-01-2019 10:33
    Thanks Peter. There I was saying it was advanced and your code's only 15 lines - I must try harder to learn MapBasic! :D

    ------------------------------
    Emma Daniel
    CDR Group
    HOPE VALLEY United Kingdom
    ------------------------------



  • 7.  RE: Keyboard shortcut to make currently selected table editable

    Posted 02-04-2019 18:18
    Cool...that's great Peter. Thank you. It's a good time saver.

    Regards,.

    ------------------------------
    George Corea
    Knowledge Community Shared Account
    Shelton CT
    ------------------------------