Inference lock lib

Hi all,

Here’s a small lib for inference locking in custom Ruby tool matching that of the native tools. It supports both Shift and Arrow Key lock.


Nice tip, good to know. The doc has never been clear on how to use inference locking in the API, and say that this was effective when a modifier key or an arrow is pressed. Thanks again.

I discovered around yesterday that you can lock inference to an arbitrary axis, e.g.a modeling axis, at the view class. I think I’ve reversed engineer this myself and drawn all the dotted helper lines and stuff in the past, not knowing the API provided this.

Still no success with arrow down perpendicular/parallel lock, but that probably doesn’t exist in the API as it was added quite recently to SketchUp.

Happy cake day btw!


1 Like

After all these years, we still discover features in the API…! Which proves that the guys at @Last where really smart in their design thinking of the API (and less so for the documentation…)

On my side, I had since long implemented some helper code to manage inferences, but this is anyway good to know for new developers and when you need to do a quick implementation.


Couldn’t have said this better myself!