'找到一个CAD对象附近的CAD对象
Function GetE_SideByE(E As AcadEntity) As AcadSelectionSet '返回
Dim Pmin As Variant, Pmax As Variant
E.GetBoundingBox Pmin, Pmax
Dim SSet As AcadSelectionSet
Set SSet = CreateSelectionSet("XX")
'SSet.Select acSelectionSetWindow, Pmin, Pmax
SSet.Select acSelectionSetCrossing, Pmin, Pmax
Set GetE_SideByE = SSet
End Function