Getboundingbox returning 0,0,0

Getboundingbox returning 0,0,0

Anonymous
Not applicable
701 Views
2 Replies
Message 1 of 3

Getboundingbox returning 0,0,0

Anonymous
Not applicable
I have stumbled upon a large problem in a script I am currently writing.

The routine basically checks for overlapping layers - it does this by copying a reference polygon to a region and doing a series of subtractions to work out how much (if any) of the polygon overlaps another one.

The script works perfectly if the reference polygon is contained completely within another (if it is smaller), or if the reference polygon overlaps the other. HOWEVER, if the polygons have vertices which touch more than once (eg they are the same shape, or share a common series of vertices) then when I run the getboundingbox command, the arrays minExt and maxExt both return 0,0,0.

Is this a limitation with the getboundingbox command, and does anybody have any ideas on how to fix this problem?

Thanks in advance.

-Tuoni
0 Likes
702 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I had the same problem.

I changed the declaration from

' This is in the vba examples
Dim startPoint(0 To 2) As Double
Dim endPoint(0 To 2) As Double

to

Dim startPoint As Variant
Dim endPoint As Variant

and it now works fine

Thierry
0 Likes
Message 3 of 3

Anonymous
Not applicable

I had the same problem with polyline but the declarations changes it realy helped.

Thanks Thierry.

 

Dominik

0 Likes