home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / DXFWriter_20312811162006.psc / DXFWriter / cAngularDimension.cls < prev    next >
Text File  |  2006-11-16  |  4KB  |  161 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4.   Persistable = 0  'NotPersistable
  5.   DataBindingBehavior = 0  'vbNone
  6.   DataSourceBehavior  = 0  'vbNone
  7.   MTSTransactionMode  = 0  'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "cAngularDimension"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = True
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = True
  14. '----------------------------------------------------------
  15. '     ⌐ 2006, Athanasios Gardos
  16. 'e-mail: gardos@hol.gr
  17. 'You may freely use, modify and distribute this source code
  18. '
  19. 'Last update: November 16, 2006
  20. 'Please visit:
  21. '     http://business.hol.gr/gardos/
  22. ' or
  23. '     http://avax.invisionzone.com/
  24. 'for development tools and more source code
  25. '-----------------------------------------------------------
  26.  
  27. Option Explicit
  28.  
  29. Private m_count As Long
  30. Private m_DimensionObjects As Long
  31.  
  32. Public LayerName As String
  33. Public LineTypeName As String
  34. Public ColorIndex As Integer
  35.  
  36. Public ax1 As Double
  37. Public ay1 As Double
  38. Public az1 As Double
  39. Public ax2 As Double
  40. Public ay2 As Double
  41. Public az2 As Double
  42.  
  43. Public bx1 As Double
  44. Public by1 As Double
  45. Public bz1 As Double
  46. Public bx2 As Double
  47. Public by2 As Double
  48. Public bz2 As Double
  49.  
  50. Public DirX As Double
  51. Public DirY As Double
  52. Public DirZ As Double
  53.  
  54. Public AngFontIndex As Integer
  55. Public AngTextHeight As Double
  56. Public AngDecimalNum As Integer
  57. Public AngArrowType As Integer
  58. Public AngFactor As Double
  59. Public AngTickSize As Double
  60. Public AngDefaultText As String
  61.  
  62. Private m_xMin As Double
  63. Private m_yMin As Double
  64. Private m_zMin As Double
  65. Private m_xMax As Double
  66. Private m_yMax As Double
  67. Private m_zMax As Double
  68.  
  69. Friend Property Get xMin() As Double
  70.     xMin = m_xMin
  71. End Property
  72.  
  73. Friend Property Let xMin(ByVal v As Double)
  74.     m_xMin = v
  75. End Property
  76.  
  77. Friend Property Get yMin() As Double
  78.     yMin = m_yMin
  79. End Property
  80.  
  81. Friend Property Let yMin(ByVal v As Double)
  82.     m_yMin = v
  83. End Property
  84.  
  85. Friend Property Get zMin() As Double
  86.     zMin = m_zMin
  87. End Property
  88.  
  89. Friend Property Let zMin(ByVal v As Double)
  90.     m_zMin = v
  91. End Property
  92.  
  93. Friend Property Get xMax() As Double
  94.     xMax = m_xMax
  95. End Property
  96.  
  97. Friend Property Let xMax(ByVal v As Double)
  98.     m_xMax = v
  99. End Property
  100.  
  101. Friend Property Get yMax() As Double
  102.     yMax = m_yMax
  103. End Property
  104.  
  105. Friend Property Let yMax(ByVal v As Double)
  106.     m_yMax = v
  107. End Property
  108.  
  109. Friend Property Get zMax() As Double
  110.     zMax = m_zMax
  111. End Property
  112.  
  113. Friend Property Let zMax(ByVal v As Double)
  114.     m_zMax = v
  115. End Property
  116.  
  117. Private Sub Class_Initialize()
  118.     m_count = 0
  119.     m_DimensionObjects = 0
  120.     LayerName = "0"
  121.     LineTypeName = "CONTINUOUS"
  122.     ColorIndex = 255
  123.     AngFontIndex = 0
  124.     AngTextHeight = 0.2
  125.     AngDecimalNum = 2
  126.     AngArrowType = 1
  127.     AngTickSize = 0.1
  128.     AngFactor = 1
  129.     AngDefaultText = ""
  130. End Sub
  131.  
  132. Friend Property Get DxfAngularDimension() As String
  133.     Dim DTStyle%, DTxtScl As Double, DimAkr As Double
  134.     Dim DimSynt As Double, DimArrow%
  135.     Dim oGeometry As cGeometry
  136.     Set oGeometry = New cGeometry
  137.     oGeometry.LayerName = LayerName
  138.     oGeometry.LineTypeName = LineTypeName
  139.     oGeometry.ColorIndex = ColorIndex
  140.     DTStyle% = AngFontIndex
  141.     DTxtScl = AngTextHeight
  142.     DimAkr = AngDecimalNum
  143.     DimSynt = AngFactor
  144.     DimArrow% = AngArrowType
  145.     DxfAngularDimension = oGeometry.PutAngle(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2, DirX, DirY, AngDecimalNum, DimSynt, AngDefaultText, DTStyle%, DTxtScl, DimArrow%, AngTickSize)
  146.     m_DimensionObjects = oGeometry.m_count
  147.     m_xMin = oGeometry.m_xMin
  148.     m_yMin = oGeometry.m_yMin
  149.     m_zMin = oGeometry.m_zMin
  150.     m_xMax = oGeometry.m_xMax
  151.     m_yMax = oGeometry.m_yMax
  152.     m_zMax = oGeometry.m_zMax
  153.     Set oGeometry = Nothing
  154. End Property
  155.  
  156. Friend Property Get DimensionObjects() As Long
  157.     DimensionObjects = m_DimensionObjects
  158. End Property
  159.  
  160.  
  161.