home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2002 March / PCWMAR02.iso / software / turbocad / v8trial / TurboCADv8ProfessionalNoReg.exe / Data.Cab / F40950_modDblLine2.bas < prev    next >
Encoding:
BASIC Source File  |  2001-10-16  |  1.6 KB  |  56 lines

  1. Attribute VB_Name = "modDblLine2"
  2. '******************************************************************'
  3. '*                                                                *'
  4. '*                      TurboCAD for Windows                      *'
  5. '*                   Copyright (c) 1993 - 2001                    *'
  6. '*             International Microcomputer Software, Inc.         *'
  7. '*                            (IMSI)                              *'
  8. '*                      All rights reserved.                      *'
  9. '*                                                                *'
  10. '******************************************************************'
  11.  
  12. Sub CreateDblLine1()
  13. Dim ActDr As Drawing
  14. Dim Grs As Graphics
  15. Dim Gr As Graphic
  16.  
  17.     Set ActDr = ActiveDrawing
  18.     Set Grs = ActDr.Graphics
  19. Dim x() As Double
  20. Dim y() As Double
  21. Dim z() As Double
  22. Dim NumPoints As Long, i As Long
  23.     NumPoints = 3
  24. ReDim x(NumPoints - 1)
  25. ReDim y(NumPoints - 1)
  26. ReDim z(NumPoints - 1)
  27.     x(0) = 2: y(0) = 3: z(0) = 0
  28.     x(1) = 5: y(1) = 6: z(1) = 0
  29.     x(2) = 7: y(2) = 3: z(2) = 0
  30. Dim Props As Properties
  31.     
  32.     Set Gr = Grs.Add(, "TCW25DblLine")
  33.     Set Props = Gr.Properties
  34.     Props("PenColor") = RGB(255, 0, 0)
  35.     Props("PenWidth") = 0.02
  36.     
  37.     Props("$DLINEWID") = 0.33
  38.     Props("$DLINECS") = 1
  39.     Props("$DLINECE") = 1
  40.         
  41.     With Gr.Vertices
  42.         For i = 0 To NumPoints - 1
  43.             .Add x(i), y(i), z(i)
  44.         Next i
  45.     End With
  46.     Gr.Draw
  47.  
  48.  
  49.     Set Props = Nothing
  50.     Set Gr = Nothing
  51.     Set Grs = Nothing
  52.     Set ActDr = Nothing
  53.  
  54.  
  55. End Sub
  56.