hehao 发表于 2008-11-15 10:10:00

求单行文本左中对齐旋转的函数?

<p>'创建一定角度(弧度)的单行文字<br/>Public Function AddTextHA(ByVal text As String, ByVal ptinsert As Variant, _<br/>&nbsp;&nbsp;&nbsp; ByVal height As Double, ByVal angle As Double) As AcadText<br/>&nbsp;&nbsp;&nbsp; Dim objText As AcadText<br/>&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; Set objText = ThisDrawing.ModelSpace.AddText(text, ptinsert, height)<br/>&nbsp;&nbsp;&nbsp; objText.Rotate ptinsert, angle<br/>&nbsp;&nbsp;&nbsp; objText.Update<br/>&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; Set AddTextHA = objText<br/>&nbsp;&nbsp;&nbsp; objText.color = 3<br/>End Function</p><p>大家帮我改改,单行文字默认是左下角对齐,在该函数里加左中对齐的命令,我需要单行文字左边中间与点对齐?</p>
页: [1]
查看完整版本: 求单行文本左中对齐旋转的函数?