给你个例子学吧
这是类clsTest 下的代码
Option Explicit
Private mWidth As Double
Public Property Get tWidth() As Double tWidth = mWidth End Property
Public Property Let tWidth(dWidth As Double) mWidth = dWidth End Property
Public Sub gsDrawLine(mDoc As AcadDocument) Dim vPt1 As Variant Dim vPt2 As Variant Dim oLine As AcadLWPolyline Dim aPts(0 To 3) As Double