How to get dimensions of the area selected?
The basic thing I can do is …
ss = Sketchup.active_model.selection
ent = ss;
origin = ent.transformation.origin;
if ent.class == Sketchup::Group
box = ent.local_bounds
if ent.class == Sketchup::ComponentInstance
box = ent.definition.bounds
The problem is that the box.max contains units instead of pixels…And I need to get or to calculate the dimensions of the rectange so I can try to change viewport.