倾斜角度决定了文本的向前或向后倾斜。 角度表示与其垂直轴(90 度)的偏移。若要设置倾斜角度,请使用该属性。倾斜角必须以弧度为单位提供。正角表示向右倾斜,负值将添加 2*PI 以将其转换为正等价物。ObliqueAngle 创建倾斜文本本示例创建一个对象,然后将文本倾斜 45 度。Text Sub Ch4_ObliqueText() Dim textObj As AcadText Dim textString As String Dim insertionPoint(0 To 2) As Double Dim height As Double ' Define the text object textString = "Hello, World." insertionPoint(0) = 3 insertionPoint(1) = 3 insertionPoint(2) = 0 height = 0.5 ' Create the text object in model space Set textObj = ThisDrawing.ModelSpace.AddText(textString, insertionPoint, height) ' Change the value of the ObliqueAngle ' to 45 degrees (.707 radians) textObj.ObliqueAngle = 0.707 textObj.Update End Sub |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-11-11 03:45
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.