sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [tutorial] Sketchup Macros (OSX)

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    18 Posts 5 Posters 5.1k Views 5 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.
    • jeff hammondJ Offline
      jeff hammond
      last edited by

      here's another one i made yesterday (wouldn't really call this a sketchup macro though)..

      it's does a 'save a copy as' plus assigns an interactive screenshot as a 512px icon to the file.. 😎

      [flash=853,480:1yl5v7i5]http://www.youtube.com/v/IFpNr2V0hRI?version=3&hl=en_US&rel=0[/flash:1yl5v7i5]

      [a sort of attempt at mimicking osx lion's Versions though this still creates multiple .skps instead of the snapshots being in a single file]

      dotdotdot

      1 Reply Last reply Reply Quote 0
      • Rich O BrienR Offline
        Rich O Brien Moderator
        last edited by

        Setting the screenshot to a fixed ratio would be nice, with a timestamp/watermark

        Download the free D'oh Book for SketchUp πŸ“–

        1 Reply Last reply Reply Quote 0
        • jeff hammondJ Offline
          jeff hammond
          last edited by

          @unknownuser said:

          Setting the screenshot to a fixed ratio would be nice, with a timestamp/watermark

          yeah.. i agree.. the popup alerting you to take a screenshot then the selection window is getting annoying..

          i think i'm going to set it up as a square ratio (height of window determines how wide to make it.. (i.e.- the same thing as choosing medium format 6x6 in advanced camera tools)

          probably won't do the timestamp.. osx makes it easy to view/sort by pretty much anything that could be associated with a file…

          (i will say, this service, while definitely helpful for me, is nowhere as neat/integrated as what's possible to do with osx itself.. i might upload an example of how saving works in Rhino (which is tied into osxVersions).. it's great.. it does take a bit of getting used to at first because typical 'save' 'save as' etc is so ingrained in us now and versions changes that (i.e.- you never save πŸ˜„ )..

          i'm sure it will come to windows soon..

          dotdotdot

          1 Reply Last reply Reply Quote 0
          • bmikeB Offline
            bmike
            last edited by

            @unknownuser said:

            @unknownuser said:

            Setting the screenshot to a fixed ratio would be nice, with a timestamp/watermark

            yeah.. i agree.. the popup alerting you to take a screenshot then the selection window is getting annoying..

            i think i'm going to set it up as a square ratio (height of window determines how wide to make it.. (i.e.- the same thing as choosing medium format 6x6 in advanced camera tools)

            probably won't do the timestamp.. osx makes it easy to view/sort by pretty much anything that could be associated with a file…

            (i will say, this service, while definitely helpful for me, is nowhere as neat/integrated as what's possible to do with osx itself.. i might upload an example of how saving works in Rhino (which is tied into osxVersions).. it's great.. it does take a bit of getting used to at first because typical 'save' 'save as' etc is so ingrained in us now and versions changes that (i.e.- you never save πŸ˜„ )..

            i'm sure it will come to windows soon..

            i so need to get on board with the saving stuff in OSX. still dating each file nearly every other day and having a hard time getting used to where to find stuff when i need a particular file. 'date modified' was my favorite sort in windows... that seems hit and miss in OSX.

            this is good stuff. thanks for sharing.

            mike beganyi design + consulting llc

            1 Reply Last reply Reply Quote 0
            • bmikeB Offline
              bmike
              last edited by

              that last video is great...
              will have to investigate that for sure.

              mike beganyi design + consulting llc

              1 Reply Last reply Reply Quote 0
              • jeff hammondJ Offline
                jeff hammond
                last edited by

                @bmike said:

                that last video is great...
                will have to investigate that for sure.

                I'll rewrite parts of it so it's not specific to my machine and share it.
                (if you're on lion, sharing services is a breeze.. still possible to share on 10.5 & 6 but the user has to manually place it in the services folder)

                dotdotdot

                1 Reply Last reply Reply Quote 0
                • pilouP Offline
                  pilou
                  last edited by

                  Cool Stuff ! 😎
                  Why only just now and not from many years ago ? 😲

                  Any idea for make the same on PC (the first macro) ❓

                  Frenchy Pilou
                  Is beautiful that please without concept!
                  My Little site :)

                  1 Reply Last reply Reply Quote 0
                  • wind-borneW Offline
                    wind-borne
                    last edited by

                    did create a couple macros 😎

                    would like guidance on creating macro of full SU window capture for icon/preview followed by cmd S without creating new file.

                    I'll let ForeverSave keep the manual(Automator) versions with it's autosave unchecked and sort from there.


                    ForeverSave 2.png

                    "To read between the lines was easier than to follow the text."OSX 10.11.6

                    %(#BF80BF)[SU 8 pro

                    1 Reply Last reply Reply Quote 0
                    • wind-borneW Offline
                      wind-borne
                      last edited by

                      Jeff,

                      having problems with the final applescript, doesn't seem to access SU.
                      "A" toggles axes off, but doesn't toggle back on with last script. Other test was trying "cmd a" in final script which should have selected all in SU but selected all on desktop instead. Tried shifting order?
                      Screen Shot 2012-04-15 at 8.44.27 AM.png

                      other problem is this SU dialog which pops up after every first save after running macro. Can I automate a Save for this?
                      SketchUp.png

                      if I use GC, icon updates on main file which is probably my main goal as I don't often use ForeverSave2 as was icing on a big Mac bundle...


                      Screen Shot 2012-04-15 at 8.46.12 AM.png

                      "To read between the lines was easier than to follow the text."OSX 10.11.6

                      %(#BF80BF)[SU 8 pro

                      1 Reply Last reply Reply Quote 0
                      • jeff hammondJ Offline
                        jeff hammond
                        last edited by

                        @wind-borne said:

                        Jeff,

                        having problems with the final applescript, doesn't seem to access SU.

                        yeah.. you've left the sketchup environment at this point in your script by going to finder and maybe graphic converter..

                        to get back to sketchup, you'll have to add this prior to your final system events tell

                        tell application "sketchup" to activate

                        this will bring sketchup back to the front application.

                        @unknownuser said:

                        other problem is this SU dialog which pops up after every first save after running macro. Can I automate a Save for this?
                        [attachment=2:32yjarrq]<!-- ia2 -->SketchUp.png<!-- ia2 -->[/attachment:32yjarrq]

                        hmm.. i'll have to look into this a little later to see what's going on..

                        fwiw, getting a non interactive screenshot (unless it's the entire screen) has proven to be a lot more difficult than i originally though it would be.. i'm in a thread at an applescript forum right now trying to reach a solution but it's not looking too good..

                        i also tried going the route of using sketchup's 2d export to create the icon image (which is actually pretty awesome because you could do pngs with transparent backgrounds.. it also eliminates what you're doing with hiding the axes because a 2d export doesn't include it).. the problem with that is there's about a 5 second delay in there because of something weird going on with the export dialogs (and i've posted about this on the google sketchup forums)..

                        if you open 'activity monitor' then go to sketchup's 2D export -> Options… you'll see a ginormous spike in cpu usage.. something is wrong with opening those panels which causes a slow down in the script i was trying to make..

                        still researching though.. non conclusive as of now.

                        dotdotdot

                        1 Reply Last reply Reply Quote 0
                        • wind-borneW Offline
                          wind-borne
                          last edited by

                          Thanks,

                          I had tried moving script between Screenshot and Finder section.

                          tell application "sketchup" to activate

                          needs to be

                          tell application "SketchUp" to activate πŸ˜†

                          Works now.

                          I was trying the " Watch Me Do" to automate pick window, didn't work how I tried.

                          "To read between the lines was easier than to follow the text."OSX 10.11.6

                          %(#BF80BF)[SU 8 pro

                          1 Reply Last reply Reply Quote 0
                          • jeff hammondJ Offline
                            jeff hammond
                            last edited by

                            @wind-borne said:

                            Thanks,

                            I had tried moving script between Screenshot and Finder section.

                            tell application "sketchup" to activate

                            needs to be

                            tell application "SketchUp" to activate πŸ˜†

                            Works now.

                            I was trying the " Watch Me Do" to automate pick window, didn't work how I tried.

                            yeah.. watch me do doesn't work out as good as it seems.. super slow and whatnot..

                            i'm now messing around with the idea of getting the icon image via ruby instead of a screenshot or GUI scripting sketchup.. ruby confuses the hell out of me though πŸ’š ..i'll make a post in the developers forum real quick.. those guys will help me sort it out.. πŸ˜‰

                            dotdotdot

                            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