sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    [Request] - Plugin to enable Macros !?

    Scheduled Pinned Locked Moved Plugins
    4 Posts 3 Posters 366 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      haynesc
      last edited by

      Hi guys ...

      i was wondering is there is away of providing sketchup with the ability to record keystrokes to perform tasks ...

      like for instance i have "T" as a shortcut for Top View ...

      what i would love as a simple example use for this ...

      would be to create a macro that when i hit "T" ... sketchup zooms extends and then changes to top view ...

      chris

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        Its a bit tricky to implement macros (impossible to do it perfectly). But small scripts are easily written for tasks like that. That is just a few lines of code. Do you want to learn ruby? 😄

        Do you have a list of specific "macros" you want?

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • H Offline
          haynesc
          last edited by

          I would like to learn ruby but as I'm not a genius it just looks like a jumble of words and characters to me ...

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            Small snippets like this is a nice way to learn - small task, but still something you can make use of.

            Lets take your first post as an example:

            <span class="syntaxdefault"><br />def top_view_zoom_extent<br />  </span><span class="syntaxcomment"># Some variables for easy reference<br /></span><span class="syntaxdefault">  model </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model<br />  view </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_view<br /><br />  </span><span class="syntaxcomment"># Orient camera top down and zoom<br /></span><span class="syntaxdefault">  new_camera </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> view</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">camera</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">set</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> ORIGIN</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> Z_AXIS</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">reverse</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> Y_AXIS </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">  view</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">zoom_extents<br />end<br /></span>
            

            Note - there are some extra steps to make it into a plugin with menus and making sure it doesn't interfer with other plugins. But as you can see - it doesn't take much code to do simple things.

            We do have a thread somewhere with links to where to get started with the concepts of scripting/programming and Ruby. I'll see if I can dig it out.

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement