Message 1 of 5
draw a line and change the view

Not applicable
04-05-2004
12:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I've made a sub to draw a line in vba:
Sub lijn(ByVal x1 As Double, ByVal y1 As Double, ByVal x2 As Double, ByVal y2 As Double, z As Double)
Dim beginpnt(0 To 2) As Double
Dim eindpnt(0 To 2) As Double
Dim lijn As AcadLine
Dim currThickness As Double
beginpnt(0) = x1: eindpnt(0) = x2
beginpnt(1) = y1: eindpnt(1) = y2
beginpnt(2) = 0: eindpnt(2) = 0
Set lijn = ThisDrawing.ModelSpace.AddLine(beginpnt, eindpnt)
lijn.Thickness = z
lijn.Update
End sub 'End of sub lijn
When I use it in top view everything works fine:
sub draw_line
bassTekenen.lijn 0, 150, 0, 200, 0
end sub 'End of draw line
But when I switch to front view the line appears as a dot.
My question is how I should programme the view switch?
Thanks
Steve
I've made a sub to draw a line in vba:
Sub lijn(ByVal x1 As Double, ByVal y1 As Double, ByVal x2 As Double, ByVal y2 As Double, z As Double)
Dim beginpnt(0 To 2) As Double
Dim eindpnt(0 To 2) As Double
Dim lijn As AcadLine
Dim currThickness As Double
beginpnt(0) = x1: eindpnt(0) = x2
beginpnt(1) = y1: eindpnt(1) = y2
beginpnt(2) = 0: eindpnt(2) = 0
Set lijn = ThisDrawing.ModelSpace.AddLine(beginpnt, eindpnt)
lijn.Thickness = z
lijn.Update
End sub 'End of sub lijn
When I use it in top view everything works fine:
sub draw_line
bassTekenen.lijn 0, 150, 0, 200, 0
end sub 'End of draw line
But when I switch to front view the line appears as a dot.
My question is how I should programme the view switch?
Thanks
Steve