sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Error message - classextension.rb

    Scheduled Pinned Locked Moved SketchyPhysics
    8 Posts 4 Posters 2.9k Views 4 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.
    • H Offline
      harnstein
      last edited by

      Hi there,

      OT: first i'd like to say "thank you" to hpnisse for your effort on helping me with my last SP problem and sorry that i didn't answer the last post- no good manners πŸ˜‰

      i still could not get it to work and had to continue on some other project...

      ON TOPIC:

      every time i press the "play" button i get the following error-message: see attachment

      anybody knows the solution?

      regards, h_


      error.png

      still sketchin'

      1 Reply Last reply Reply Quote 0
      • C Offline
        CPhillips
        last edited by

        At first glance it looks like it might be a conflict with another plugin. Could you let me know which other ones you have installed.

        1 Reply Last reply Reply Quote 0
        • H Offline
          harnstein
          last edited by

          first, happy new year! πŸ˜„

          i've been off till yesterday, visiting my hometown, celebrating, holidays..

          thanks for your reply- here they are

          #extrusionToolbar.rb
          ._crease.gif
          ._extrude.gif
          ._knife.gif
          ._proxy.gif
          ._smooth.gif
          ._subdivide.gif
          ._subsmooth.rbs
          ._subsmooth_load.rb
          2DTools
          3DxSketchUp
          BZ_Dir
          CD_ICONS
          clf_shape_bender
          clf_simple_loft
          CURVILOFT_Dir_10
          DEFPARAM_Dir
          Examples
          FixReversedFaceMaterials
          FREDOSCALE_Dir_20
          Icons
          JPP_Dir
          LIBFREDO6_Dir_32
          LIBFREDO6_Dir_33
          LIBFREDO6_Dir_35
          mover2
          mover_extensions
          OBJImport
          Ocean
          Projection
          protrude
          ROUNDCORNER_Dir_20
          ROUNDCORNER_Dir_21
          SketchyPhysics3
          skin
          SoapSkinBubble
          Subsmooth
          TIGtools
          tooling
          TOS_Dir_16
          TT_Lib
          TT_Lib2
          Utilities
          2D#.rb
          3DxSketchUp.rb
          ArchetypesStairMaker.rb
          arraysum.rb
          bezierspline.rb
          BZ__BSplineU.rb
          BZ__CubicBezier.rb
          cd_architect.rb
          cd_architect_extension.rb
          cd_draw_extension_m.rb
          cd_draw_m.rb
          cd_power_extension_m.rb
          cd_power_m.rb
          cd_power_n.rb
          cd_standard.rb
          cd_zelect.rb
          cd_zelect_extension.rb
          centerpoint.rb
          Chamfer_Along_Path.rb
          ClassExtensions.rb
          cleanup_model.rb
          clf_shape_bender_loader.rb
          clf_simple_loft_loader.rb
          config-thumb.jpg
          crease.gif
          cubicpanoout.rb
          deBabelizer.rb
          delauney2.rb
          EntsGetAtt.rb
          eq_grapher.rb
          examples.rb
          extensions.rb
          extrude.gif
          ExtrudeAlongPath.rb
          extrudeEdgesByEdges.rb
          extrudeEdgesByFace.rb
          extrudeEdgesByFaces.rb
          extrudeEdgesByLathe.rb
          extrudeEdgesByLoft.rb
          extrudeEdgesByRails.rb
          extrudeEdgesByRailsByFace.rb
          extrudeEdgesByRailsToLattice.rb
          extrudeEdgesByVector.rb
          FAK.rb
          FixReversedFaceMaterials.rb
          follow_this1.rb
          FredoScale_ZH.lang
          GetCentroid.rb
          getMaterials.rb
          heightfield_gen_v6.rb
          jf_unfoldtool.rb
          jointpushpull.rb
          knife.gif
          Latticeizer.rb
          LibFredo6.rb
          LibTraductor.def
          LibTraductor.rb
          lines2tubes.rb
          lsystem.rb
          makefaces11.rb
          mesh_additions.rb
          Mirror_31.rb
          mover.rb
          OBJImport.rbs
          ocean_extension.rb
          offset.rb
          parametric.rb
          pathcopy.rb
          PipeAlongPath.rb
          progressbar.rb
          projection_extension.rb
          proxy.gif
          RubyWinFunc.so
          SectionCutFace.rb
          Sketchup.rb
          SketchyFFD.rb
          skin.rb
          smooth.gif
          SoapSkinBubbleTools.rb
          stair.rb
          subdivide.gif
          subsmooth.rbs
          subsmooth_load.rb
          Thumbs.db
          tooling.rb
          tt_0000_menu.rb
          tt_bitmap2mesh.rb
          tt_cleanup.rb
          tt_material_tools.rb
          tt_plan_tools.rb
          tt_uv_toolkit.rb
          utilities.rb
          vector.flat_angle.rb
          vfs.rb
          weld.rb
          windowizer.rb
          ZLoader__Curviloft.rb
          ZLoader__FredoScale.rb
          ZLoader__OnSurface.rb
          ZLoader__RoundCorner.rbv

          maybe (or surely) they are a bit messy, i always wanted to clean up a bit.. soon..

          maybe you'll find something in there!

          greets

          _h

          still sketchin'

          1 Reply Last reply Reply Quote 0
          • C Offline
            CPhillips
            last edited by

            Ouch. Thats a lot to test. Can you send me a model that fails and I'll take a look.

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              You can edit ../Plugins/SketchyPhysics3/ClassExtensions.rb with a plain-text editor [Notepad[++].exe or similar]... around line #59

              class Sketchup;;Group
                  def definition # make it so you can use group.definition
              	return(entities[0].parent)
                  end   
              end
              

              change it to read

              class Sketchup;;Group
                if not Sketchup;;Group.method_defined?(;definition)
                  def definition() # make it so you can use group.definition
              	return(self.entities.parent)
                  end
                end#if    
              end
              

              This code is used to set the group.definition method not available directly in the API...
              In its current form it is looking for a parent of the first entity [0] in the group's entities - if there is no first [0] entity in the entities it fails because 'nil' has no parent.
              The suggested change explicitly refers to the group's entities AND even if the entities is empty it returns the parent and thereby the definition...
              NOTE: an even safer 'method' is this

              class Sketchup;;Group
                   # Some times the 'group.entities.parent' refer to the wrong definition. 
                   # This method checks for this error and locates the correct parent definition.
                   if not Sketchup;;Group.method_defined?(;definition)
                     def definition()
                        if self.entities.parent.instances.include?(self)
                           return self.entities.parent
                        else
                           Sketchup.active_model.definitions.each { |definition|
                              next if not definition.group?
                              return definition if definition.instances.include?(self)
                           }
                        end
                        return nil # Should never happen.
                     end
                   end#if
                  end
              

              Note how the suggested code changes test to see if the group.definition method is already set [by another tool or perhaps even SketchUp in a yet to come API upgrade] and it doesn't change it if it is...
              IF you have other scripts that are also defining group.definition [do a 'grep' search through Plugins for "class Sketchup::Group"] it might also be best for you to substitute the same class/method definition and tests for all of them πŸ˜•

              TIG

              1 Reply Last reply Reply Quote 0
              • H Offline
                harnstein
                last edited by

                um, computer's secrets..

                i uninstalled / reinstalled SP several times- now, as i get all these helpful advices, i reinstalled SP once more, and it's working again after all..! tsss. havent't changed anything.

                so i, you, we cannot figure out what has been the problem.

                thanks for your effort, maybe i get that error again one day πŸ˜‰, then i will start here again.

                now i can at last check out a skp-SP-file which i had some problems with and got helped here-

                πŸŽ‰

                an this file i posted in july, as i remember.. πŸ˜‰

                wish you a nice day!

                still sketchin'

                1 Reply Last reply Reply Quote 0
                • C Offline
                  CPhillips
                  last edited by

                  I am glad its working. πŸ˜„ but I would have liked to figure out the conflict. 😞

                  I wonder if it might have to do with the order plugins are installed....

                  1 Reply Last reply Reply Quote 0
                  • I Offline
                    i74s00
                    last edited by

                    exactly same error i geting after pressing "START"... So after whole day of installing and uninstalling i find that trouble was "clf_simple_loft_01b" plugin. (Error on SU6 and 8 and all SP versions, for me ....(WIN XP,32)) Hope it helps for someone. πŸ˜‰

                    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