AUTOMATICALLY ASSIGNING OUTFLOW ELEMENT

How to automatically assign imported shape or cad file of catchment area to nearest manhole as outfall element?