I think so. As a starting point you may want to look at the plug-in mentioned in my other reply to this thread. See: http://svn.gnome.org/viewvc/dia/trunk/plug-ins/python/select_by.py?view=markup