求助你好:我的程序在此:
Private Sub Command1_Click() On Error Resume Next Dim acadApp As AcadApplication Set acadApp = GetObject(, "AutoCAD.Application") acaApp.Command = script.exe If Err Then Err.Clear Set acadApp = CreateObject("AutoCAD.Application") If Err Then MsgBox Err.Description Exit Sub End If End If Dim plineobj As Autocad.AcadLWPolyline Dim points(0 To 5) As Double points(0) = 1: points(1) = 1 points(2) = 100: points(3) = 100 points(4) = 200: points(5) = 200 Set plineobj = acadApp.ActiveDocument.ModelSpace.AddlightweightLWPolyline(points) plineobj.Closed = ture ZoomExtents ZoomAll acadApp.Visible = True End Sub
谢谢你!总算有侠义之士了 |