Newby Ruby "Undefined Method" issue
-
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
-
The error is telling you the variable
hex_face
isnil
rather than a Sketchup::Face object. So your next step in debugging is to understand whyhex_face
is not a Face object.For a short piece of code like this, simply inspecting the variables after each line might be helpful.
-
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.
Advertisement