Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
đź«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Start_operation backward compatibility
-
Since I'm sure everyone wants to take advantage of the speed improvements in SU7 by using the new start_operation syntax:
Sketchup.active_model.start_operation("Draw a Boat-Load of Geometry", true)and also retain backward compatibility; what's a good way to code this up? I guess this would work:
if Sketchup.version.split(".")[0].to_i >= 7 Sketchup.active_model.start_operation("Draw a Boat-Load of Geometry", true) else Sketchup.active_model.start_operation("Draw a Boat-Load of Geometry") endIs this a case where over-loading start_operation would be a good thing?
-
But when using old plugins with new Sketchup you need to make sure your overwriting code is loaded before the old plugins are loaded. Maybe you want to program a "Load Old Plugins" Plugin, put the old plugins into a separate folder, ...
For your if-statement: Sketchup.version[0,1].to_i
azuby
-
Thanks for the tip. I just made use of it and it's working good. Operation took abtou 2 minutes in SU6 while no more than 30 seconds in SU7.
Advertisement