明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2598|回复: 2

[求助]

[复制链接]
发表于 2005-12-17 22:09 | 显示全部楼层 |阅读模式

求助你好:我的程序在此:

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

谢谢你!总算有侠义之士了

发表于 2005-12-17 23:03 | 显示全部楼层
不好意思,不懂
 楼主| 发表于 2005-12-18 08:53 | 显示全部楼层
没关系了,共同学习,谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-26 22:42 , Processed in 0.198608 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表