- 积分
- 283
- 明经币
- 个
- 注册时间
- 2005-1-8
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
Public Sub mi(ss As AcadSelectionSet, x1, y1, x2, y2) ''''''''''''''选择集镜像 Dim p1(2) As Double, p2(2) As Double p1(0) = x1: p1(1) = y1: p1(2) = 0 p2(0) = x2: p2(1) = y2: p2(2) = 0 Dim ent As AcadEntity If ss.Count > 0 Then For Each ent In ss ent.Mirror p1, p2 Next End If End Sub
Private Sub drawline(x1 As Double, y1 As Double, x2 As Double, y2 As Double, lay As String) '用指定层画直线 Dim first(0 To 2) As Double, scond(0 To 2) As Double Dim lineobj As AcadLine first(0) = x1: first(1) = y1: first(2) = 0 scond(0) = x2: scond(1) = y2: scond(2) = 0 Set lineobj = acaddoc.ModelSpace.AddLine(first, scond) lineobj.Layer = lay End Sub
sub mir()'''''''对选择的线条进行镜象操作 Set cen = acaddoc.ModelSpace.AddLine(p1, p2) cen.Layer = "3" drawline (边梁翼缘宽 - 边梁腹板厚) / 2, 0, (边梁翼缘宽 - 边梁腹板厚) / 2, 单节长度, "4" Dim sset As AcadSelectionSet Dim po(2) As Double po(0) = 边梁翼缘宽 - 边梁腹板厚) / 2: po(1) = 0: po(2) = 0 Set sset = acaddoc.SelectionSets.Add("1") sset.SelectAtPoint po''''''''''''''''''''''''''''''''''''''''选择要镜象的直线 mi sset, 边梁翼缘宽 * 2, 0, 边梁翼缘宽 * 2, 单节长度 End Sub
就是搞不懂为什么通过选择定义的点"po(2)为坐标数组" 的直线进行镜象操作没有反映啊?????????????????????????????????????????????????????????
敬请各位高手指正!!!!谢谢!!!! |
|