' 将点的UCS坐标转化到WCS坐标 Private Function PtUcs2Wcs(ptUcs As Variant) As Variant PtUcs2Wcs = ThisDrawing.Utility.TranslateCoordinates(ptUcs, acUCS, acWorld, False) End Function Sub 画点编程081007() Dim startPoint(0 To 2) As Double Dim OjtPoint As AcadPoint 'Dim ptStart As Variant 'Dim ptEnd As Variant Dim ptStart(0 To 2) As Double Dim ptEnd(0 To 2) As Double ptStart(0) = 0 ''40''X值 ptStart(1) = 100 ''Y值 ptStart(2) = 0 '400'''Z值 Dim ptStUcs As Variant ptStUcs = PtUcs2Wcs(ptStart) Set OjtPoint = ThisDrawing.ModelSpace.AddPoint(ptStUcs) End Sub |