Public Sub saveDocument()
Dim doc As GcadDocument
Set doc = thisDrawing.Application.Documents.Add()
Dim ptStart(0 To 2) As Double
Dim ptEnd(0 To 2) As Double
ptStart(0) = 0
ptStart(1) = 0
ptStart(2) = 0
ptEnd(0) = 100
ptEnd(1) = 100
ptEnd(2) = 0
Dim line As GcadLine
Set line = thisDrawing.ModelSpace.AddLine(ptStart, ptEnd)
doc.SaveAs "c:\test.dwg", ac2004_dwg
End Sub
因为是用的浩辰CAD,所以acadDocument 改为了GcadDocument
运行时候可以新建图形,画直线,但是没法正确保存,请问上面程序有什么错误吗?
谢谢