• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Default save as v7?

Scheduled Pinned Locked Moved Developers' Forum
12 Posts 5 Posters 998 Views
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.
  • P Offline
    Pixero
    last edited by 9 Sept 2010, 08:15

    Posted this in another thread but maybe it belongs here:

    Is there a way to set SU8 to save as SU7 by default thrugh ruby?
    (Like how I can set MS Word 2007 to save as MS Word 2003 by default.)
    Needed if several users work together and don't have the same version.

    1 Reply Last reply Reply Quote 0
    • M Offline
      Morgan74
      last edited by 10 Sept 2010, 09:29

      Hello,

      Sorry, but I think we can't do that because the Model.save method haven't option to set the SU version you want.
      http://code.google.com/intl/fr-FR/apis/sketchup/docs/ourdoc/model.html#save

      Bye

      1 Reply Last reply Reply Quote 0
      • P Offline
        Pixero
        last edited by 10 Sept 2010, 11:26

        That means I'll have to continue with SU7 until SU has some features that can convince my boss to upgrade for all of us.
        😒

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dan Rathbun
          last edited by 10 Sept 2010, 16:25


          Sketchup.active_model.method('save').arity returns 1 for the argument count, which is the save filename pathstring.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dan Rathbun
            last edited by 10 Sept 2010, 16:32

            ... and model.export does not work with a .skp file extension.

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • P Offline
              Pixero
              last edited by 10 Sept 2010, 17:12

              @dan rathbun said:


              Sketchup.active_model.method('save').arity returns 1 for the argument count, which is the save filename pathstring.

              Would you care to explain? 😳
              IS there a way of saving as SU7?

              1 Reply Last reply Reply Quote 0
              • T Offline
                thomthom
                last edited by 10 Sept 2010, 17:17

                Nope.

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

                1 Reply Last reply Reply Quote 0
                • T Offline
                  thomthom
                  last edited by 10 Sept 2010, 18:01

                  @dan rathbun said:

                  The arity method tells us how many arguments a method has.

                  Does it work for methods implemented in C?

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

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dan Rathbun
                    last edited by 10 Sept 2010, 20:06

                    @thomthom said:

                    @dan rathbun said:

                    The arity method tells us how many arguments a method has.

                    Does it work for methods implemented in C?

                    Well... since Ruby's internal methods are written in C, check this out:

                    Varible number of args:
                    Object.method('instance_eval').arity

                    -1

                    No args:
                    Object.method('id').arity

                    0

                    One arg:
                    Object.method('method').arity

                    1

                    Two args:
                    Object.method('instance_variable_set').arity

                    2

                    ..and etc.

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      Dan Rathbun
                      last edited by 11 Sept 2010, 14:27

                      @pixero said:

                      @dan rathbun said:


                      Sketchup.active_model.method('save').arity returns 1 for the argument count, which is the save filename pathstring.

                      Would you care to explain? 😳

                      The arity method tells us how many arguments a method has.
                      Therefore the above call, shows us that no new arguments have been added in v8.

                      @pixero said:

                      IS there a way of saving as SU7?

                      Not automatically... but you can do so manually, thru the Save As... dialog.

                      And there seems to be a bug (in SU8😞
                      Dir.chdir( File.dirname( Sketchup.active_model.path ) ) Sketchup.active_model.save( File.basename(Sketchup.active_model.path) )

                      Does NOT save the model AT ALL in ANY version, regardless of what version the file is, or whether or not it has been modified, BUT stills returns true !
                      ~

                      I'm not here much anymore.

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        Pixero
                        last edited by 15 Sept 2010, 08:45

                        Sorry for bringing this up again, but if I save as SU7 in SU8 and then after that press Save.
                        Will that continue to be a SU7 version or will it overwrite it back to SU8?

                        1 Reply Last reply Reply Quote 0
                        • TIGT Offline
                          TIG Moderator
                          last edited by 15 Sept 2010, 11:30

                          If you are working in a model that's been opened in 'v8' then whenever you 'save' it will be as in the 'v8' format.
                          Whenever you use 'save_as' it will be saved in the 'selected format' at the point you press OK: this defaults to 'v8' format every time: so you have to change it manually each time to another earlier version format - e.g. 'v7'...

                          Sorry, but your "dream" hasn't / won't come true... 😞

                          TIG

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

                          Advertisement