Public Function InArry(ByVal n1 As Variant, ByVal n2 As Variant, ByVal u1 As Variant, ByVal u2 As Variant) As AcadEntity
Dim SSet As AcadSelectionSet
Dim element As AcadEntity
Set SSet = createSSet("mySelectionSet")
SSet.SelectOnScreen
For Each element In SSet
Set InArry = element.ArrayRectangular(n1, n2, 1, u1, u2, 1)
Next
End Function
Sub bbb()
Dim AA
AA = InArry(2, 2, 2, 2)
End Sub
Public Function InArry(ByVal n1 As Variant, ByVal n2 As Variant, ByVal u1 As Variant, ByVal u2 As Variant) As Variant
Dim SSet As AcadSelectionSet
Dim element As AcadEntity
Set SSet = createSSet("mySelectionSet")
SSet.SelectOnScreen
For Each element In SSet
InArry = element.ArrayRectangular(n1, n2, 1, u1, u2, 1)
Next
End Function