đź’ˇ LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
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") end
Is 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