Sketchup kind of 'stuck' after scripts
-
Do you have any hints?
I tried
model.active_view.refresh
or
selection.clearbut none helped.
If you want me to post all that code I'll do.
Mainly that are modified versions of Fillet.rb, Pipe_along_Path.rb. -
@ghandi said:
Mainly that are modified versions of Fillet.rb, Pipe_along_Path.rb.
First step would be to check if the original versions work ok for you.If yes,than find the differences.Than add every difference to the original(working) code.Then you will know what line makes your code not working. -
will do.
-
I suspect that you have made a 'tool' that doesn't exit but sits there waiting for more input... without giving us some clues with your code we can't really help much more
-
So I figured the problem arises from the originalfillet.rb (attached)
For my modified version I mainly removed following lines
89-91
101-103
110-126
166-167so these lines can't be responsible for the problem.
The remaining code looks normal to me.
I tried to locate the problem by putting returns here and there but no
-
Nothing is wrong.You are just "in the tool".
When the tool is selected,you can do just what the tool let you do.So it can be like stuck.
You just have to select other tools to exit this tool. -
That's it.
So I just activate the "Select-Tool" with
Sketchup.active_model.select_tool(nil)
Is that what I want?
Or is there an other way to close the Tool?
Thank you
-
If you want to "close" a tool,you have to select another tool.
If you want to do it in code,trySketchup.send_action "selectSelectionTool;"
,or other tools you want.
-
Solved. Thank you very much.
-
@voljanko said:
If you want to "close" a tool,you have to select another tool.
If you want to do it in code,trySketchup.send_action "selectSelectionTool;"
,or other tools you want.
Does that work on OSX?
A safer method is
Sketchup.active_model.select_tool( nil )
-
Sketchup.send_action("selectSelectionTool:")
should work cross-platform - it's only the numerical codes that are PC specific likeSketchup.send_action(10501)
which is PC only whereas the equivalentSketchup.send_action("viewTop:")
works on PC & MAC...
Advertisement