kingzgh 发表于 2009-2-11 20:37:00

[求助]画剖面线

我打算学习画剖面线<br/>&nbsp;&nbsp; 直线我是会的,但是箭头不知道怎么处理以及转角处的转折线不知道怎么画及转角处的标签字母如何写出?最好画完后能够对箭头、转角线及标签字母可以编辑??<br/>&nbsp;&nbsp; 有没有人能提供一个大概的思路如何完成或者提供一段示例代码,非常感谢!!!!!<img src="file:///D:/我的文档/My%20Pictures/2.bmp" border="0" alt=""/>

caiqs 发表于 2009-2-13 08:40:00

<p>这是VBA帮助里的,我改了一下,你自已看吧</p><p></p><p>Sub Example_AddLeader()<br/>&nbsp;&nbsp;&nbsp; ' This example creates a leader in model space.<br/>&nbsp;&nbsp;&nbsp; ' The leader is not attached to any annotation object<br/>&nbsp;&nbsp;&nbsp; ' in this example.<br/>&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; Dim leaderObj As AcadLeader<br/>&nbsp;&nbsp;&nbsp; Dim points(0 To 8) As Double<br/>&nbsp;&nbsp;&nbsp; Dim leaderType As Integer<br/>&nbsp;&nbsp;&nbsp; Dim annotationObject As AcadObject<br/>&nbsp;&nbsp;&nbsp; Dim insertpt(2) As Double<br/>&nbsp;&nbsp;&nbsp; insertpt(0) = 15: insertpt(1) = 20: insertpt(2) = 0<br/>&nbsp;&nbsp;&nbsp; Set annotationObject = ThisDrawing.ModelSpace.AddMText(insertpt, 30, "例子")<br/>&nbsp;&nbsp;&nbsp; annotationObject.Height = 6<br/>&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; points(0) = 0: points(1) = 0: points(2) = 0<br/>&nbsp;&nbsp;&nbsp; points(3) = 10: points(4) = 10: points(5) = 0<br/>&nbsp;&nbsp;&nbsp; points(6) = 20: points(7) = 10: points(8) = 0<br/>&nbsp;&nbsp;&nbsp; leaderType = acLineWithArrow<br/>&nbsp;&nbsp;&nbsp; 'Set annotationObject = Nothing<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; ' Create the leader object in model space<br/>&nbsp;&nbsp;&nbsp; Set leaderObj = ThisDrawing.ModelSpace.AddLeader(points, annotationObject, leaderType)<br/>&nbsp;&nbsp;&nbsp; ZoomAll<br/>&nbsp;&nbsp;&nbsp; <br/>End Sub<br/>&nbsp; </p><p></p>

wuyunpeng888 发表于 2009-2-22 19:18:00

<p>你想要的并不是<strong>剖面线,是剖切符号</strong></p><p><strong>带箭头的可以用多段线做</strong></p>
页: [1]
查看完整版本: [求助]画剖面线