Visual Basic Customization
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Getboundin gbox returning 0,0,0
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
155 Views, 2 Replies
11-02-2006 02:18 AM
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
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
Re: Getboundin gbox returning 0,0,0
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-19-2007 01:22 AM in reply to:
Tuoni
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
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
Re: Getboundin gbox returning 0,0,0
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-24-2011 05:08 AM in reply to:
Tuoni
I had the same problem with polyline but the declarations changes it realy helped.
Thanks Thierry.
Dominik

