how to achieve the same effect as the label function in sketchup, which is displaying the dynamic drag label effects before clicking to set label,like the vedio below
how to achieve the same effect as the label function in sketchup, which is displaying the dynamic drag label effects before clicking to set label,like the vedio below
have a look at su_examples/linetool.rb
from the Extension warehouse…
john
Those are old examples. Prefer the GitHub examples instead:
they may be old but are easier to access and better commented for learning than, for example, ’ CustomTool ’ which has similar functionality, on GitHub…
why aren’t the su_examples withdrawn if we shouldn’t point to them?
john
Too many things to do vs time capacity. It wouldn’t take long to remove the old examples, but we’ve simply gotten they were still around. A clean up is due.
There “Tutorial” version is much more verbose:
The “Examples” are terser for easier copy+paste.
that looks better…
remember I started when ‘re-writihg’ and ‘extending’ ‘linetool.rb’ was a ‘right of passage’…
I still use some of the methods from those early attempts…
john
Yi, after you get the point and the object under the point, and the rubber-banding gives you the vector to where the text label will be positioned, you create the Sketchup::Text
object using …