On Rotate observer?


Is there an observer in the ruby api for “onRotate”? On placement in a model my code calls the rotate tool. I am hoping to call the selection tool after the rotate. Is there anything in the api for this?

class MyModelObserver < Sketchup::ModelObserver

	def onPlaceComponent(instance)		
		Sketchup.send_action "selectRotateTool:"



You don’t actually need to call the rotate tool. It is built-in to place component.

Just after you place the component, … (the MoveTool is activated,)
… hover over the newly place compoennt and you’ll see rotate “spots” appear. (look like little red crosses.) Put the mouse cursor over one and you’ll see the rotate protractor popup.

There is the ToolsObserver so you can watch what SketchUp is doing.

If you must, you might attach an EntityObserver to the instance placed in the callback you show above.