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.
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