Quantcast
Channel: Extensions - SketchUp Community
Viewing all articles
Browse latest Browse all 3598

Codesnippet works in Console but not in "Ruby Code Editor"

$
0
0

@I_Alain_I wrote:

Hi

I try to run this Code Snippet.

model=Sketchup.active_model
eye=model.active_view.camera.eye
ss=model.selection[0]
distance=eye.distance(ss.bounds.center)

When I copy&paste it into the Console then I get the distance between the Camera Eye to the Center of the Boundingbox of the selection.
But when I paste this code into the "Ruby Code Editor" an click on "run" then I get this Error in the Console:

Error: #
C:/Users/blablabla/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/as_rubyeditor/as_rubyeditor.rb:270:in =='
C:/Users/blablabla/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/as_rubyeditor/as_rubyeditor.rb:270:in
!='
C:/Users/blablabla/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/as_rubyeditor/as_rubyeditor.rb:270:in block in initialize'
SketchUp:1:in
call'

There must be some basic understanding I missed.
Does anybody know what I do wrong ?

Kind regards
Alain

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 3598

Trending Articles