# Image....InputPoint.....Pick

**URL:** <https://forums.sketchup.com/t/image-inputpoint-pick/114276>\
**Category:** Ruby API\
**Created:** [January 23, 2020, 7:48pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276 "2020-01-23T19:48:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beppe64](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@Beppe64](https://forums.sketchup.com/u/Beppe64)\
**Post date:** [January 23, 2020, 7:48pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/1 "2020-01-23T19:48:36Z")

</div>

Hello everyone, you can use this image of the “pencil”,

![Img_pickPoint](https://global.discourse-cdn.com/sketchup/original/3X/0/c/0c9c99bce030d06a2dff0d85a4267322404213d6.png)

used when running the “line” command, in the Api Ruby language,  
while using it in the code…“InputPoint”…“Pick”… etc…

Thank you for your help…

Joseph.

---

<div class="post-metadata">

**Author:** ![TIG](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tig/32/198_2.png) [@TIG](https://forums.sketchup.com/u/TIG)\
**Post date:** [January 23, 2020, 7:55pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/2 "2020-01-23T19:55:07Z")

</div>

You must make your own image files for cursors, buttons etc and load them into your tool…  
They need to be packaged with the Ruby code files - typically you find them in an Images subfolder in that extension’s subfolder… They are then referenced as that Tool’s cursor and so on…

Look at some other authors’ [non-encrypted] code to see how they do it…

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [January 23, 2020, 9:51pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/3 "2020-01-23T21:51:25Z")

</div>

The native cursor images are in the “Images” subfolder of the installation path.  
On Windows they’ll be SVG images, on Mac they’ll be PDF files.

This one is named “cursor\_line”.

---

<div class="post-metadata">

**Author:** ![TIG](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tig/32/198_2.png) [@TIG](https://forums.sketchup.com/u/TIG)\
**Post date:** [January 23, 2020, 10:15pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/4 "2020-01-23T22:15:40Z")

</div>

It’s probably not a good idea to copy a cursor image file exactly.  
That might lead to some confusion in the users’ minds.  
However, you could use it to make your own similar ones…

---

<div class="post-metadata">

**Author:** ![Beppe64](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@Beppe64](https://forums.sketchup.com/u/Beppe64)\
**Post date:** [January 23, 2020, 10:43pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/5 "2020-01-23T22:43:57Z")

</div>

> [@TIG](#):
>
> Look at some other authors’ [non-encrypted] code to see how they do it…

“Look at some other authors’ [non-encrypted] code to see how they do it…”

I couldn’t find anything, to figure out how to do it…  
I also tried to look for directions on the Ruby Api online manual,  
but at the moment I have not found specific indications…

---

<div class="post-metadata">

**Author:** ![Beppe64](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@Beppe64](https://forums.sketchup.com/u/Beppe64)\
**Post date:** [January 23, 2020, 10:44pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/6 "2020-01-23T22:44:41Z")

</div>

Thank you for the answer…

---

<div class="post-metadata">

**Author:** ![Beppe64](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@Beppe64](https://forums.sketchup.com/u/Beppe64)\
**Post date:** [January 23, 2020, 10:48pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/7 "2020-01-23T22:48:47Z")

</div>

Of course, it is not my intention to use the same image, but to create a personal one… at the time I was curious to know, how to make a personal image appear to the movement of the mouse, in inserting, for example a point… or other drawing actions…

---

<div class="post-metadata">

**Author:** ![reididrub](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@reididrub](https://forums.sketchup.com/u/reididrub)\
**Post date:** [January 23, 2020, 11:27pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/8 "2020-01-23T23:27:15Z")

</div>

```
Snippet of the beginning code of a tool using a cursor:

```

class MyTool

```
def initialize()
	@model = Sketchup.active_model
	@state = 0
	@cursorpath=@resourcesPath+ "/measureTool.png"
	@idcursor = UI::create_cursor @cursorpath, 10, 10 if @cursorpath
end

def activate
	Sketchup::set_status_text("Click first point")
	@ip1 = Sketchup::InputPoint.new()
end

def onSetCursor
	UI::set_cursor @idcursor if (@idcursor != 0)
end

```

…  
end

---

<div class="post-metadata">

**Author:** ![Beppe64](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@Beppe64](https://forums.sketchup.com/u/Beppe64)\
**Post date:** [January 23, 2020, 11:37pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/9 "2020-01-23T23:37:36Z")

</div>

Thank you very much… now I just have to study the use of this piece of code…

😥 😥 😥

---

<div class="post-metadata">

**Author:** ![TIG](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tig/32/198_2.png) [@TIG](https://forums.sketchup.com/u/TIG)\
**Post date:** [January 24, 2020, 12:59pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/10 "2020-01-24T12:59:58Z")

</div>

There are literally hundreds of examples !  
Download some from [sketchucation.com](http://sketchucation.com)…

e.g. my own **2Dtools** has lots of custom buttons and cursors, so of which switch at different stages of a tool’s use - as an additional indicator to the user…

> **[SketchUp Plugins | PluginStore | SketchUcation](https://sketchucation.com/pluginstore?pln=2Dtools)**
>
> SketchUp Plugin and Extension Store by SketchUcation provides free downloads of hundreds of SketchUp extensions and plugins

---

<div class="post-metadata">

**Author:** ![Beppe64](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@Beppe64](https://forums.sketchup.com/u/Beppe64)\
**Post date:** [January 24, 2020, 5:37pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/11 "2020-01-24T17:37:23Z")

</div>

Thank you very much for answering me…

😜 😜

---

<div class="post-metadata">

**Author:** ![Beppe64](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@Beppe64](https://forums.sketchup.com/u/Beppe64)\
**Post date:** [January 24, 2020, 8:34pm UTC](https://forums.sketchup.com/t/image-inputpoint-pick/114276/12 "2020-01-24T20:34:56Z")

</div>

Again many thanks, for pointing me to the 2dTools file.rbz…  
Seen many files .rb, unprotected, so I can use them as a studio,  
in learning the Ruby language, especially the Ruby API for Sketchup…

Joseph.

😜 😜  
👍 👍
