Cursor changes on origin or intersect


With the built-in line tool the cursor changes to an X at line intersections and an o at origin along with a tool tip. In my tool I’ve gotten the tool top but can’t get the cursor. What Sketchup object should I be looking at? I’ve looked at View, InputPoint, Pick_Helper but can’t find a way to change cursor.

Unclear docs for InputPoint::display?

InputPoint.draw is what you need to draw the inference points. This assumes you are making the input point pick on mouse move so it contain valid data.


I get the tooltip on origin or intersect but not the cursor. Could you point me to an example?


Are you calling InputPoint.pick in onMouseMove?



Are there any good books on programming for Sketchup? The online docs are really skimpy.


You also need to call view.invalidate to mark the view for redraw. Often this is done in mouse events.


Still need a little help on this. Still no cursor.

@pPoint = # Earlier in class

def onMouseMove(flags, iXPick, iYPick, suView)
suView.lock_inference @pPoint
@pPoint.draw suView
@pPoint.pick suView, iXPick, iYPick
sPrompt = @prompt + @pPoint.position.to_s
Sketchup::set_status_text sPrompt, SB_PROMPT
suView.tooltip = @pPoint.tooltip
rescue exception


InputPoint.draw must be called in .def draw(view):

(Btw, please mark chunks of code as “Preformatted Text”, makes it so much easier to read. )


Sorry about the code. It looks okay on my screen until I post Reply. I’ll keep fumbling around with this until I get it right. I’m an old fashion amateur programmer and just wish there was a good book with tons of examples on how to program for Sketchup. For a professional programmer the online might make sense. But for me I have to keep going back and forth, hither and yon to make sense of it.