Default save as v7?
-
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. -
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#saveBye
-
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.

-
Sketchup.active_model.method('save').arityreturns 1 for the argument count, which is the save filename pathstring. -
... and model.export does not work with a .skp file extension.
-
@dan rathbun said:
Sketchup.active_model.method('save').arityreturns 1 for the argument count, which is the save filename pathstring.Would you care to explain?

IS there a way of saving as SU7? -
Nope.
-
@dan rathbun said:
The arity method tells us how many arguments a method has.
Does it work for methods implemented in C?
-
@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').arity0
One arg:
Object.method('method').arity1
Two args:
Object.method('instance_variable_set').arity2
..and etc.
-
@pixero said:
@dan rathbun said:
Sketchup.active_model.method('save').arityreturns 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 !
~ -
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? -
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...

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement