sketchucation logo sketchucation
    • Login
    1. Home
    2. brandenberg
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 1

    brandenberg

    @brandenberg

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    brandenberg Unfollow Follow
    registered-users

    Latest posts made by brandenberg

    • RE: Sketchup.send_action arguments: Mac vs PC

      This is an old thread, but I'm adding a tip here that may be of help to other developers who may discover this info...

      In an effort to create a toolbar button to show the "Entity Info" palette (there's a built-in button for Model Info, but oddly not for Entity Info), I couldn't find a method or action that worked on the Mac. There is a fixnum constant value for the PC, but these don't seem to work on the Mac, even after years of SketchUp evolution on the Mac. Then I stumbled on the get_shortcuts method...

      Using the "Shortcuts" pane within the "Preferences" window, you can add a shortcut to the command for which you need the string constant, then using:

      Sketchup.get_shortcuts.sort

      ...you can discover the string that can successfully be used with the Sketchup.send_action method. For example, I added the F2 key to "Window/Entity Info", and got the following output:

      Sketchup.get_shortcuts.sort
      ["A\tselectSelectionTool:", "B\tselectPaintTool:", "C\tselectCircleTool:", "E\tselectEraseTool:", "F\tviewZoomExtents:", "F2\tentityProperties:", "G\tmakeGroup:", "H\tselectDollyTool:", "K\ttoggleDisplayBackEdges:", "L\tselectLineTool:", "O\tselectOrbitTool:", "P\tselectPushPullTool:", "R\tselectRotateTool:", "S\tselectScaleTool:", "T\tselectMeasureTool:", "V\tselectMoveTool:", "Z\tselectZoomTool:", "`\ttoggleHideRestOfModel:", "~\ttoggleHideSimilarComponents:", "⇧G\t/Edit/Context Menu Flyout/Explode"]

      In there, you'll see "F2\tentityProperties:", so the string constant is "entityProperties:".

      Voila, a method to discover undocumented action strings.

      posted in Developers' Forum
      B
      brandenberg