Look at the GetBoundingBox Method.
Registered forum members do not see this ad.
Hello again,
In way to define the insertion point when creating a block with a selectionset (see my previous here) I try to find the lower left point of the box containing all the entities in my selectionset.
I think I found something in ACAD VBA help, a function to do this but I can't find it again.
Thank you
John




Look at the GetBoundingBox Method.
Registered forum members do not see this ad.
Yes, of course ! I knew something existed !
Thanks,
John
PS: here is my function :
Code:'Look for the lower left point of all the entities in a selectionset : Function pntInsert(sset As AcadSelectionSet) As Variant Dim acadobj As AcadObject Dim minExt As Variant Dim maxExt As Variant Dim test As Boolean Dim pbas As Variant test = False For Each acadobj In sset acadobj.GetBoundingBox minExt, maxExt If test = False Then pbas = minExt test = True End If If minExt(0) < pbas(0) Then pbas(0) = minExt(0) 'x mini If minExt(1) < pbas(1) Then pbas(1) = minExt(1) 'y mini Next acadobj pntInsert = pbas End Function
Bookmarks