Dimension tool (as in sketchup)

 From:  Michael Gibson
7403.27 In reply to 7403.25 
Hi Max,

> Could you help me? I have problem with pointpicker snapping. Is there a way to exclude
> all objects with "Dimensions" style from the object snapping list?

You can do that by making a pass through those objects before using the pointpicker, and turn off the "hit test" flag on each of those objects using: obj.setHitTest( false );

If an object is set with the "no hit test" flag, it should cause the pointpicker to skip over it and not target any snaps on it, and also it won't be targeted for selection either. Then if you want it to behave normally later on afterwards you'll need to set obj.setHitTest( true ); on those same objects to reset it.

If you do not have the objects already separated out somehow, you can find the style index of the "Dimensions" style by using:

code:
var style = moi.geometryDatabase.findStyle( 'Dimensions', false /*CreateIfNotFound*/ );
if ( style )
{
    var index = style.index;

     // Now look for objects that have obj.styleIndex == index
}


Hope that does what you need!

- Michael