明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2099|回复: 4

[求助]请教用VB如何画多段线

[复制链接]
发表于 2008-7-15 09:10 | 显示全部楼层 |阅读模式
请教用VB如何画多段线
发表于 2009-3-8 22:01 | 显示全部楼层
我也想知道如何画 ,难道没有人会吗
发表于 2009-3-10 17:20 | 显示全部楼层
  1. Sub Example_AddPolyline()
  2.     ' 该示例在模型空间中创建多段线。
  3.    
  4.     Dim plineObj As AcadPolyline
  5.     Dim points(0 To 14) As Double
  6.    
  7.     ' 定义二维多段线顶点
  8.     points(0) = 1: points(1) = 1: points(2) = 0
  9.     points(3) = 1: points(4) = 2: points(5) = 0
  10.     points(6) = 2: points(7) = 2: points(8) = 0
  11.     points(9) = 3: points(10) = 2: points(11) = 0
  12.     points(12) = 4: points(13) = 4: points(14) = 0
  13.         
  14.     ' 在模型空间中创建多段线
  15.     Set plineObj = ThisDrawing.ModelSpace.AddPolyline(points)
  16.     ZoomAll
  17.    
  18. End Sub
发表于 2019-10-4 15:02 | 显示全部楼层

大佬 在excel vba 能否实现
发表于 2019-10-5 12:25 | 显示全部楼层
qq365305753 发表于 2019-10-4 15:02
大佬 在excel vba 能否实现

可以实现。在EXCEL VBA中引用CAD类库就可以了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-28 17:56 , Processed in 0.200076 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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