class Sketchup::DimensionObserver
This observer interface is implemented to react to changes in dimension text.
@abstract To implement this observer, create a Ruby class of this type,
override the desired methods, and add an instance of the observer to the dimensions of interest.
@example
# This is an example of a DimensionObserver class MyDimensionObserver < Sketchup::DimensionObserver def onTextChanged(dimension) puts "onTextChanged: #{dimension}, new_text= #{dimension.text}" end end # Attach the observer. (Assumes there is a dimension in the model root.) dim = Sketchup.active_model.entities.grep(Sketchup::Dimension).first dim.add_observer(MyDimensionObserver.new)
@version SketchUp 2014
Public Instance Methods
onTextChanged(dimension)
click to toggle source
The {#onTextChanged} method is invoked when your entity is erased.
@example
def onTextChanged(dimension) puts "onTextChanged: #{dimension}, new_text= #{dimension.text}" end
@param [Sketchup::Dimension] dimension
The dimension object whose text has been changed.
@version SketchUp 2014
# File lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb, line 39 def onTextChanged(dimension) end