Since Sketchup 14 there is a new API function
add_dimension_linear see
In trying to understand and use it I have looked for some examples and discussions at:
- http://forums.sketchup.com/t/adding-dimensions-to-a-line-with-ruby/1158
- http://sketchucation.com/forums/viewtopic.php?f=15&t=62331
the offeset_vector parameter is described in the API reference as:
the parallel offset vector from the reference line to the dimension line measured from the 'start' reference point.
In the example e.g.
dim = entities.add_dimension_linear edge, mp, cp, [20, 0, 0]
the Vector is 20,0,0.
How is this Vector to be chosen?