オブジェクトの回転角度を指定します。
サポートされているプラットフォーム: Windows のみ
VBA:
object.Rotation
タイプ: Attribute、AttributeReference、BlockReference、DgnUnderlay、Dim3PointAngular、DimAligned、DimAngular、DimArcLength、DimDiametric、Dimension、DimOrdinate、DimRadial、DimRadialLarge、DimRotated、DwfUnderlay、ExternalReference、GeomapImage、GeoPositionMarker、MInsertBlock、MText、OLE、PdfUnderlay、PointCloud、PointCloudEx、RasterImage、Shape、Text、Wipeout
このプロパティが適用されるオブジェクト。
読み込み専用: いいえ
タイプ: 倍精度浮動小数点数型(ACAD_ANGLE タイプの OLE オブジェクトを除く)
ラジアン単位で表した回転角度
回転角度は、Z 軸から原点を見下ろしたときに左回りを正の値とする、オブジェクトの WCS の X 軸との相対値です。
Raster: ラスター イメージを指定された回転角度で表示するには、ShowRotation プロパティを True に設定します。
Text: 回転角度は、Alignment プロパティが、acAlignmentAligned または acAlignmentFit に設定されているときは読み込み専用です。

文字の回転角度

寸法線の角度
VBA:
Sub Example_Rotation()
' This example creates a text object in model space.
' It then changes the Rotation of the text object.
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)
ZoomAll
MsgBox "The Rotation is " & textObj.rotation, vbInformation, "Rotation Example"
' Change the value of the Rotation to 45 degrees (.707 radians)
textObj.rotation = 0.707
ZoomAll
MsgBox "The Rotation is set to " & textObj.rotation, vbInformation, "Rotation Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_Rotation()
;; This example creates a text object in model space.
;; It then changes the Rotation of the text object.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the text object
(setq textString "Hello, World."
insertionPoint (vlax-3d-point 3 3 0)
height 0.5)
;; Create the text object in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq textObj (vla-AddText modelSpace textString insertionPoint height))
(vla-ZoomAll acadObj)
(alert (strcat "The Rotation is " (rtos (vla-get-Rotation textObj) 2)))
;; Change the value of the Rotation to 45 degrees (.707 radians)
(vla-put-Rotation textObj 0.707)
(vla-ZoomAll acadObj)
(alert (strcat "The Rotation is set to " (rtos (vla-get-Rotation textObj) 2)))
)