excel里调用autocad库出问题了?
Public Sub DrawAutoCADLine()<BR> Dim AutoCADApplication As AutoCAD.Application<BR> <BR> Dim StartLine(0 To 2) As Double<BR> Dim EndLine(0 To 2) As Double<BR> <BR> Set AutoCADApplication = creatobject("AutoCAD.Application")<BR> <BR> StartLine(0) = Cells(2, 2).Value<BR> StartLine(1) = Cells(3, 2).Value<BR> EndLine(0) = Cells(2, 3).Value<BR> EndLine(1) = Cells(3, 3).Value<BR> <BR> AutoCADApplication.ActiveDocument.ModelSpace.AddLine StartLine, EndLine<BR> <BR>End Sub以上代码在excel的vba中写入,已经在引用里加入了autocad 2004 库,但是还是不能识别:autocad.application 提示用户定义类型未定义。不知道为什么。 sharksun发表于2004-4-18 18:37:00static/image/common/back.gifDim AutoCADApplication As AutoCAD.Application
<BR> AutoCAD.Application ???
是 AutoCAD.AcadApplication 吧 对对对。
//blush
页:
[1]