Python SCript - 'NoneType' object has no attribute 'vertices'
It says 'NoneType' object has no attribute 'vertices', so it can be an empty that is being selected. You must check that the objects are meshes:

actob = bpy.context.active_object
if actob.type == 'MESH':
    actobdat = actob.data
    dimact = actob.dimensions
    [...]
    for ob in scene.objects:
        if ob.type == 'MESH':
            dimob = ob.dimensions
            etc...


You use bpy.context.active_object to get the active object, the index 0 of selected_objects will give you the last object added to the scene within the selection.