Custom dimension tool

Is this possible?

I would like to have something similar to the dimension tool, but have the text in a different spot. Instead of having a line with the measurement in the middle, I would like the text to be at the end of the line facing up. I also need the dimension to always be in inches, not feet and inches.

Is there a way of subclassing dimensionlinear to do this? I looked at the dimensionobserver class, but there doesn’t seem to be an event for when the dimension changes.

Global dimension settings can be made via the Model Info > Dimensions panel.

Individual settings for a dimension can be made via the popup right-click context menu.

DimensionLinear is a subclass, ie:

Sketchup::DimensionLinear::ancestors

returns:

[ 
  Sketchup::DimensionLinear, Sketchup::Dimension, 
  Sketchup::Drawingelement, Sketchup::Entity, 
  ::Object, JSON::Ext::Generator::GeneratorMethods::Object,
  PP::ObjectMixin, ::Kernel, ::BasicObject
]

so, this class is a descendant class of Sketchup::Entity, and if the developers did things correctly, the Sketchup::EntityObserver callback for onChangeEntity should fire.

Test and see.

http://www.sketchup.com/intl/en/developer/docs/ourdoc/entityobserver