AutoCAD开发7--坐标转换

Posted jordonin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AutoCAD开发7--坐标转换相关的知识,希望对你有一定的参考价值。

Dim dx As Double

    Dim dy As Double

    Dim arf As Double

    Dim m As Double

   

 Dim r(0 To 3, 0 To 3) As Double

  旋转矩阵

    r(0, 0) = m * Math.Cos(arf): r(0, 1) = -m * Math.Sin(arf): r(0, 2) = 0: r(0, 3) = dx

    r(1, 0) = m * Math.Sin(arf): r(1, 1) = m * Math.Cos(arf): r(1, 2) = 0: r(1, 3) = dy

    r(2, 0) = 0: r(2, 1) = 0: r(2, 2) = m: r(2, 3) = 0

    r(3, 0) = 0: r(3, 1) = 0: r(3, 2) = 0: r(3, 3) = 1

 

    Dim pSlct As AcadSelectionSet

    Set pSlct = CreateSelectionSet

   

    UserForm1.Hide

   

    pSlct.SelectOnScreen

   

    Dim pObject As Object

   

    For Each pObject In pSlct


        pObject.TransformBy (r)
    Next pObject

 

以上是关于AutoCAD开发7--坐标转换的主要内容,如果未能解决你的问题,请参考以下文章

怎样用VB对AutoCAD 进行二次开发?急!急!急!

推荐net开发cad入门阅读代码片段

Excel控制AutoCad进行坐标标注

基于C#编程语言的CAD二次开发技术---展测量点坐标

CAD数据导入Arcgis10.1的依赖关系

AUTOCAD——坐标标注