编辑ZWCAD实体--旋转对象
来源:互联网 发布:java 加载 scala脚本 编辑:程序博客网 时间:2024/05/20 06:38
Imports ZwSoft.ZwCAD.Runtime
Imports ZwSoft.ZwCAD.ApplicationServices
Imports ZwSoft.ZwCAD.DatabaseServices
Imports ZwSoft.ZwCAD.EditorInput
Imports ZwSoft.ZwCAD.Geometry
Public Class ZwcadApps
<CommandMethod("RotateObject")> _
Public Sub RotateObject()
Dim ZcDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim ZcDB As Database = ZcDoc.Database
Dim ZcEd As Editor = ZcDoc.Editor
Using ZcTran As Transaction = ZcDB.TransactionManager.StartTransaction()
Dim peo As New PromptEntityOptions(vbLf & "Select object:")
Dim per As PromptEntityResult = ZcEd.GetEntity(peo)
If per.Status <> PromptStatus.OK Then
Return
End If
Dim Ent As Entity = ZcTran.GetObject(per.ObjectId, OpenMode.ForWrite)
Dim pro1 As New PromptPointOptions(vbLf & "Input base point:")
Dim proR1 As PromptPointResult = ZcEd.GetPoint(pro1)
If proR1.Status <> PromptStatus.OK Then
Return
End If
Dim basePt As Point3d = proR1.Value
Dim pro2 As New PromptAngleOptions(vbLf & "Specify rotation angle:")
Dim proR2 As PromptDoubleResult= ZcEd.GetAngle(pro2)
If proR2.Status <> PromptStatus.OK Then
Return
End If
Dim ang As Double = proR2.Value
Dim Mt As Matrix3d = Matrix3d.Rotation(ang, New Vector3d(0, 0, 1), basePt)
Ent.TransformBy(Mt)
ZcTran.Commit()
End Using
End Sub
End Class
- 编辑ZWCAD实体--旋转对象
- 编辑ZWCAD实体--复制对象
- 编辑ZWCAD实体--缩放对象
- 编辑ZWCAD实体--移动对象
- 编辑ZWCAD实体--偏移对象
- 编辑ZWCAD实体--镜像对象
- 创建ZWCAD实体--对齐标注
- 创建ZWCAD实体--弧长标注
- 03-04 创建和编辑AutoCAD实体(四) 编辑二维命名对象 (1)
- 03-04 创建和编辑AutoCAD实体(四) 编辑二维命名对象 (2)
- 03-04 创建和编辑AutoCAD实体(四) 编辑二维命名对象 (3)
- 03-04 创建和编辑AutoCAD实体(四) 编辑二维命名对象 (4)
- 03-04 创建和编辑AutoCAD实体(四) 编辑二维命名对象 (5)
- 03-04 创建和编辑AutoCAD实体(四) 编辑二维命名对象 (6)
- 03-04 创建和编辑AutoCAD实体(四) 编辑二维命名对象 (7)
- 03-04 创建和编辑AutoCAD实体(四) 编辑二维命名对象 (8)
- 03-04 创建和编辑AutoCAD实体(四) 编辑二维命名对象 (9)
- 03-01 创建和编辑AutoCAD实体(一) 打开和关闭对象
- 实验三:jsp页面数据采集技术 <FORM> 表单技术
- 用fdisk分区sd卡从sd卡上加载rootfs
- hdu 3247 Resource Archiver
- Unity 画三角形
- UIColor生成UIImage
- 编辑ZWCAD实体--旋转对象
- 获取android联系人信息
- fdisk命令详解
- 说说我们开发中的编码规范
- NIO理解通道 selector SeverSocketChannel serverSocket selectionKey
- 报表添加用户自定义面板
- shell 函数返回值接收问题
- Poor Guy Has Came
- python math模块