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
*malcolm
reverse / bulge
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
85 Views, 1 Replies
04-28-2000 02:57 PM
I am writting a program that will reverse the direction of a polyline.
given a bulge factor what is the eaiest way to calculate a bulge for
the reverse direction ?
Changing the sign i.e from + to - does not work.
Yes, I do understand that there are programs that exist.
given a bulge factor what is the eaiest way to calculate a bulge for
the reverse direction ?
Changing the sign i.e from + to - does not work.
Yes, I do understand that there are programs that exist.
*malcolm
Re: reverse / bulge
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-28-2000 03:37 PM in reply to:
*malcolm
Sorry my mistake.
changing the sign does work.
for anyone that is intrested, here it is
'program to reverse the direction of a pline
Private Sub reverse_pline(plineObj As Variant)
Dim pts() As Double
Dim bulge() As Double
Dim legs As Integer
Dim retcoord As Variant
Dim i As Integer
Dim i2 As Integer
retcoord = plineObj(0).Coordinates
ReDim Preserve pts(UBound(retcoord))
legs = (UBound(retcoord) / 2) - 1
ReDim Preserve bulge(legs)
For i = legs To 0 Step -1
bulge(i) = plineObj(0).GetBulge(legs - i) * -1
Next i
For i = UBound(retcoord) To 0 Step -2
i2 = UBound(retcoord) - i
pts(i2 + 1) = retcoord(i)
pts(i2) = retcoord(i - 1)
Next i
plineObj(0).Coordinates = pts
For i = 0 To legs
plineObj(0).SetBulge i, bulge(i)
Next i
End Sub
changing the sign does work.
for anyone that is intrested, here it is
'program to reverse the direction of a pline
Private Sub reverse_pline(plineObj As Variant)
Dim pts() As Double
Dim bulge() As Double
Dim legs As Integer
Dim retcoord As Variant
Dim i As Integer
Dim i2 As Integer
retcoord = plineObj(0).Coordinates
ReDim Preserve pts(UBound(retcoord))
legs = (UBound(retcoord) / 2) - 1
ReDim Preserve bulge(legs)
For i = legs To 0 Step -1
bulge(i) = plineObj(0).GetBulge(legs - i) * -1
Next i
For i = UBound(retcoord) To 0 Step -2
i2 = UBound(retcoord) - i
pts(i2 + 1) = retcoord(i)
pts(i2) = retcoord(i - 1)
Next i
plineObj(0).Coordinates = pts
For i = 0 To legs
plineObj(0).SetBulge i, bulge(i)
Next i
End Sub
