I need to make my own tool, very similar to “Line” but a little bit extended.
First of all I need to draw line (using my new tool) always in the same Z level.
After draw a line I need to draw rectangle (length = length of line, width and height = choose by user). And make some other things. This I can make in observer.
My plan is:
- choose tool which starts observer (Sketchup::EntitiesObserver def onElementAdded)
- draw a line
- draw a rectangle and push face
- make DC
- stops observer after change tool to another
But I don’t have idea how to make a tool which starts observer and after change tool to another, stops observer.