sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Newby Ruby "Undefined Method" issue

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 3 Posters 446 Views 3 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.
    • S Offline
      sandstorm06
      last edited by

      First time post!

      I am doing an exercise in Automatic SketchUp, and I running into an issue.
      When I preform the 'pushpull' method, I am presented the the "undefined method" error.
      I am writing exactly what the exercise has written, but I am stumped with this error.

      Thank you


      1.jpg

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        The error is telling you the variable hex_face is nil rather than a Sketchup::Face object. So your next step in debugging is to understand why hex_face is not a Face object.

        For a short piece of code like this, simply inspecting the variables after each line might be helpful.

        Hi

        1 Reply Last reply Reply Quote 0
        • M Offline
          mcekk
          last edited by

          The code is good. From the console it appears that the first run was ok, and then you ran again the script and the face cannot be created. The problem is that you are trying to create a face object in the same place occupied by the face created before. Clean all your objects first (select all> delete), and try again.

          Manuel Eguia
          Associate Professor
          University of Quilmes

          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