Product : Engine, Version : 4.x, ArticleID : 41023438

HowTo : Creation of 3D lines

Article41023438
TypeHowTo
ProductEngine
Version4.x
Date Added2/10/2004
Submitted byPhillip Petty
Keywords

Subject

Creation of 3D lines

Summary

How can I create 3D lines and display them in different views?

Solution

Private Sub Command1_Click()
    vdraw.ActiveDocument.ActiveColor = 1
    vdraw.ActiveDocument.Entities.AddLine Array(0, 0, 0), Array(100, 0, 0)
    vdraw.ActiveDocument.ActiveColor = 3
    vdraw.ActiveDocument.Entities.AddLine Array(0, 0, 0), Array(0, 100, 0)
    vdraw.ActiveDocument.ActiveColor = 5
    vdraw.ActiveDocument.Entities.AddLine Array(0, 0, 0), Array(0, 0, 100)
    vdraw.ActiveDocument.ActiveColor = 6
    vdraw.ActiveDocument.Entities.AddLine Array(0, 0, 0), Array(100, 100, 100)
    vdraw.CommandAction.Zoom "E", 0, 0
End Sub

Private Sub Command2_Click()
    vdraw.CommandAction.View3D ("VTOP") 'Sets the view point to top
End Sub

Private Sub Command3_Click()
    vdraw.CommandAction.View3D ("VLEFT") 'Sets the view point to left
End Sub

Private Sub Command4_Click()
    vdraw.CommandAction.View3D ("VBOTTOM") 'Sets the view point to bottom
End Sub

Private Sub Command5_Click()
    vdraw.CommandAction.View3D ("VROT") 'Rotate dynamic (press right mouse click to end this job)
End Sub

Private Sub Form_Load()
    vdraw.ShowWCSAxis = 5 'Show axis
End Sub