Default save as v7?
-
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').arity
returns 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').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? -
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').arity
0
One arg:
Object.method('method').arity
1
Two args:
Object.method('instance_variable_set').arity
2
..and etc.
-
@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 !
~ -
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...
Advertisement