明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 995|回复: 5

Mirror出来的图形怎么设为acadentity变量

[复制链接]
发表于 2015-6-21 23:32:14 | 显示全部楼层 |阅读模式
试了一下,
dim cc=acadentity
dim dd=acadentity
mirror_Point1( 0 to 2) as double
.....................(略)
然后使用
Set dd = cc.Mirror mirror_Point1, mirror_Point2 或者set dd=cc.Mirror 都不行,

我想把镜像出来的acadentity作为变量,请问该如何写?
 楼主| 发表于 2015-6-22 11:26:52 | 显示全部楼层
有哪位大虾,帮忙解答一下,感谢感谢!祝端午快乐!
 楼主| 发表于 2015-6-22 18:25:08 | 显示全部楼层
在线坐等
发表于 2015-6-22 18:58:19 | 显示全部楼层
  1. Sub Example_Mirror()
  2.     ' This example creates a lightweight polyline
  3.     ' and then mirrors that polyline.
  4.    
  5.     ' Create the polyline
  6.     Dim plineObj As AcadLWPolyline
  7.     Dim points(0 To 11) As Double
  8.     points(0) = 1: points(1) = 1
  9.     points(2) = 1: points(3) = 2
  10.     points(4) = 2: points(5) = 2
  11.     points(6) = 3: points(7) = 2
  12.     points(8) = 4: points(9) = 4
  13.     points(10) = 4: points(11) = 1
  14.     Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
  15.     plineObj.Closed = True
  16.     ZoomAll
  17.    
  18.     ' Define the mirror axis
  19.     Dim point1(0 To 2) As Double
  20.     Dim point2(0 To 2) As Double
  21.     point1(0) = 0: point1(1) = 4.25: point1(2) = 0
  22.     point2(0) = 4: point2(1) = 4.25: point2(2) = 0
  23.         
  24.    
  25.     ' Mirror the polyline
  26.     Dim mirrorObj As AcadLWPolyline
  27.     Set mirrorObj = plineObj.Mirror(point1, point2)
  28.    
  29.     ZoomAll
  30.     Dim objEnt As AcadEntity
  31.     Set objEnt = mirrorObj
  32.     MsgBox objEnt.ObjectName
  33. End Sub
 楼主| 发表于 2015-6-22 21:49:50 | 显示全部楼层
zzyong00 发表于 2015-6-22 18:58

感谢老大,发现基本上就老大一个人回帖
顺便请教一下,我想用 Select acSelectionSetAll, , , FilterType, FilterData 只选择模型空间的,不对布局空间进行选择,该怎么弄?谢谢!
发表于 2015-6-22 23:08:44 | 显示全部楼层
组码67        值为空或0时即指图元在模型空间,如果为1指在图形空间
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-25 11:43 , Processed in 0.174919 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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