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!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Code problem between windows-versions ??

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 2 Posters 224 Views 2 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.
    • artmusicstudioA Offline
      artmusicstudio
      last edited by

      hi,
      i have a strange problem:

      in windows vista / skp 8 and skp 6 this peace of code (within the whole ruby) works perfectly (the group is copied, named and transformed copy-times:

      
      angle = @arena_angle_half*2
      		puts angle
      
      		entities = @group_stair.entities
      		group_arena = entities.add_group
      
      			for copy in 1..@arena_angle_devider
      			angle1 = copy *  angle
      			group = @group_stair.copy
      3863			group.name = "arena-copy" + copy.to_s
      			tr = Geom;;Transformation.rotation(point,vector,angle1)
      			@entities2.transform_entities(tr, group.entities.to_a)
      			end
      
      

      to my surprise, it does not work on

      win 7 / skp 8
      win xp / skp 8

      this error is reported in the console

      Error: #<NoMethodError: undefined method name=' for nil:NilClass> C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/01.rb:3863:in arena'
      C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/01.rb:3860:in each' C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/01.rb:3860:in arena'
      C:/Program Files (x86)/Google/Google SketchUp 8/Plugins/01.rb:212

      has anybody an idea, what this problem could be?

      thank you very much!

      stan

      1 Reply Last reply Reply Quote 0
      • tt_suT Offline
        tt_su
        last edited by

        Do you have the same plugins installed in all the SketchUp versions. sounds like you are suddenly getting a nil from @group_stair.copy - there might be some plugins that override this and change it's behaviour.

        1 Reply Last reply Reply Quote 0
        • artmusicstudioA Offline
          artmusicstudio
          last edited by

          hi tt, although i synchronise the plugin-folders carefully,
          making the win7 folder empty in deed was the solution.

          so now i have to find out , which plugin has a conflict and can correct my code.

          it was the first time, something like that happend. interesting!

          thanx a lot for your "expert's eye".

          stan

          ps: i just wonder, where to send all the cookies afterwards,,,,

          1 Reply Last reply Reply Quote 0
          • tt_suT Offline
            tt_su
            last edited by

            You try to search the RB files for "class Sketchup::Group" or "def copy" - hoping the culprit is not scrambled. Might same you some investigation time.

            1 Reply Last reply Reply Quote 0
            • artmusicstudioA Offline
              artmusicstudio
              last edited by

              hi,
              problem solved, it was sketchy physics. i will try to redifine my code later, maybe i will find the problem.
              stan

              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