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

    Help with opening additional instance of SketchUp.

    Scheduled Pinned Locked Moved Developers' Forum
    17 Posts 5 Posters 913 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.
    • Dan RathbunD Offline
      Dan Rathbun
      last edited by

      On Mac.. an additional Sketchup instance is not needed as the Mac edition is a tabbed MDI (Multiple Document Interface.) So using the API method Sketchup.open_file you should be able to have your plugin edit the component file in a new model tab.

      I did log requests for several new methods for MDI use such as a close_model method, along with appropriate observers. If more coders ask for these in the API Wish list forum, perhaps their priority will be raised.

      Additional topic threads on this subject:
      [Wishlist] Edit Component
      [HowTo?] Edit Components (or change "active level")

      I'm not here much anymore.

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

        favicon

        (www.ruby-forum.com)

        @unknownuser said:

        If you are just trying to avoid blocking you could use
        system("start process") as start returns immediately.

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

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

          @honoluludesktop said:

          system ("start C:\Program Files\Google\Google SketchUp 8\SketchUp.exe")

          Avoid spaces between method name and brackets.

          Of all your different versions to call it, have you tried adding quotes around the path to SketchUp?

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

          1 Reply Last reply Reply Quote 0
          • honoluludesktopH Offline
            honoluludesktop
            last edited by

            My original code, system file_path_name+name+".skp" starts a second instance of SU, suspending the first. I tried every combination of:

            system("start"+file_path_name+name+".skp") system(start file_path_name+name+".skp") system(start,file_path_name+name+".skp") system ("start C:/Program Files/Google/Google SketchUp 8/SketchUp.exe") system ("start C:\\Program Files\\Google\\Google SketchUp 8\\SketchUp.exe") Thread.new {system ("start C:\\Program Files\\Google\\Google SketchUp 8\\SketchUp.exe")}

            etc. and, couldn't start sketchup, with or without, a parameter. system ("start command") however, will open the cmd window without suspending the first instance of Sketchup. What could I be doing wrong?

            1 Reply Last reply Reply Quote 0
            • honoluludesktopH Offline
              honoluludesktop
              last edited by

              No, I'll try those too.

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

                This worked:
                system('start "New SketchUp Window" "C:/Program Files (x86)/Google/Google SketchUp 8/SketchUp.exe"')

                I looked at the help information for start:
                start_args.png

                Turns out the first argument must be a title - for that command window that briefly flickers.

                Not sure if this works under OSX though.

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

                1 Reply Last reply Reply Quote 0
                • honoluludesktopH Offline
                  honoluludesktop
                  last edited by

                  OK, now I have, but to no avail. Will comeback and try later, just have to go and eat some breakfast.

                  Addenda: posted without seeing yours. Thanks.

                  1 Reply Last reply Reply Quote 0
                  • honoluludesktopH Offline
                    honoluludesktop
                    last edited by

                    Thomas, Thanks, it too works for me. Don't think that I would have thought to enclose the set of parentheses in another enclosing parentheses.

                    system("C:/Program Files/Google/Google SketchUp 8/SketchUp ") will start without specifying ".exe", or splashing a cmd window. So, that may work with OSX. But excluding ".exe" in system('start "process......."') fails to start. I think (for now) that I will stick with starting the second instance of SketchUp with UI.openURL('process.....'). Don't know if that works with OCX. In Win, however, Sketchup appears to start faster, but don't know about the overhead.

                    I see that your version of DOS is 6.1. Is this its original release, or the one that came with your WinOS? Which machine were you on at the time? I have a copy of DOS 6.1 (left over from the good old days) installed in a VPC.

                    1 Reply Last reply Reply Quote 0
                    • Dan RathbunD Offline
                      Dan Rathbun
                      last edited by

                      The paths to Sketchup.app on OSX, and Sketchup.exe on Windows, are different.

                      I'm not here much anymore.

                      1 Reply Last reply Reply Quote 0
                      • Dan RathbunD Offline
                        Dan Rathbun
                        last edited by

                        @honoluludesktop said:

                        I see that your version of DOS is 6.1. Is this its original release, or the one that came with your WinOS? Which machine were you on at the time? I have a copy of DOS 6.1 (left over from the good old days) installed in a VPC.

                        FYI ... DOS 6.22 came out at the same time as Win 3.11 for Workgroups (I still have my disks and manuals as well.) DOS 7 was distroed with Win98 (not sure about Win95.) Win 2000 & up are NTFS not DOS.

                        BUT ... you misread the image. It is the Windows ver that is displayed, not DOS.
                        Win 5.0 = Windows 2000
                        Win 5.1 = Windows XP
                        Win 6.0 = Windows Vista
                        Win 6.1 = Windows 7

                        I'm not here much anymore.

                        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