smxzt 发表于 2008-9-24 11:14:00

[求助]实现斜标注?

<p>怎么用程序控制标注实现斜标注?</p><p>怎样才能将标注中的竖线变成斜线???</p><p></p><p>先谢谢了</p>

smxzt 发表于 2008-9-24 11:16:00

<p>E:\delphi设计\桥面铺装\a.dwg</p><p></p><p>怎么用程序控制标注实现斜标注?</p><p>怎样才能将标注中的竖线变成斜线???</p><p></p><p>先谢谢了</p>

smxzt 发表于 2008-9-24 11:20:00

<p>E:\delphi设计\桥面铺装\a.jpg</p><p></p><p></p><p>怎么用程序控制标注实现斜标注?</p><p>怎样才能将标注中的竖线变成斜线???</p><p></p><p>先谢谢了</p>

wylong 发表于 2008-9-24 15:28:00

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

smxzt 发表于 2008-9-26 08:43:00

<p>实现不了,主要是标注中的竖线变成斜线</p><p></p>
页: [1]
查看完整版本: [求助]实现斜标注?