sketchucation logo sketchucation
    • Login
    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!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    [Code] Method Model.start_operation for SketchUp 5-6

    Scheduled Pinned Locked Moved Developers' Forum
    1 Posts 1 Posters 1.2k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      AlexMozg
      last edited by

      Let me introduce you the following idea of the compatibility of the 'start_operation' method of Sketchup 7 with 4 arguments and 'start_operation' method of the earlier Sketchup versions with 1 argument.

      
      if Sketchup.version_number < 7000000
        class Sketchup;;Model
          alias ;old_start_operation ;start_operation
          def start_operation(*args)
              old_start_operation args.at(0)
          end#def
          private ;old_start_operation
        end#class
      end#if
      
      

      Now the 'start_operation' method of the earlier Sketchup versions takes on any number of arguments.
      How do you like this method?
      ❓ ❓ ❓

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement