明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1326|回复: 4

[求助]实现斜标注?

[复制链接]
发表于 2008-9-24 11:14:00 | 显示全部楼层 |阅读模式

怎么用程序控制标注实现斜标注?

怎样才能将标注中的竖线变成斜线???

先谢谢了

 楼主| 发表于 2008-9-24 11:16:00 | 显示全部楼层

E:\delphi设计\桥面铺装\a.dwg

怎么用程序控制标注实现斜标注?

怎样才能将标注中的竖线变成斜线???

先谢谢了

 楼主| 发表于 2008-9-24 11:20:00 | 显示全部楼层

E:\delphi设计\桥面铺装\a.jpg

怎么用程序控制标注实现斜标注?

怎样才能将标注中的竖线变成斜线???

先谢谢了

发表于 2008-9-24 15:28:00 | 显示全部楼层

' 创建出同dli命令创建的一样的标注
Sub AddDimRotated()
    Dim dimObj As AcadDimRotated
    Dim point1 As Variant
    Dim point2 As Variant
    Dim location As Variant
    Dim rotAngle As Double
    Dim rotAngleNunmer As Integer
    
    rotAngleNunmer = 1
    
    With ThisDrawing.Utility
        point1 = (.GetPoint(, "请指定标注起始点(按Esc或Enter或左健退出):"))
        If IsEmpty(point1) Then Exit Sub
    End With
    
    With ThisDrawing.Utility
        point2 = (.GetPoint(, "请指定标注结束点(按Esc或Enter或左健退出):"))
        If IsEmpty(point2) Then Exit Sub
    End With
    
    With ThisDrawing.Utility
        location = (.GetPoint(, "请指定标注基准点(按Esc或Enter或左健退出):"))
        If IsEmpty(location) Then Exit Sub
    End With
    
    On Error Resume Next
    rotAngleNunmer = ThisDrawing.Utility.GetInteger(vbCrLf & "输入标注位置 [上(1)/下(2)/左(3)/右(4)]: <" & rotAngleNunmer & ">:")
    
    Select Case rotAngleNunmer
        Case 1, 2
            rotAngle = 0
        Case 3, 4
            rotAngle = 90
    End Select
    
    rotAngle = rotAngle * 3.141592 / 180#       ' covert to Radians
    
    Set dimObj = ThisDrawing.ModelSpace.AddDimRotated(point1, point2, location, rotAngle)
End Sub

 楼主| 发表于 2008-9-26 08:43:00 | 显示全部楼层

实现不了,主要是标注中的竖线变成斜线

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-26 07:30 , Processed in 0.174320 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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