Vla-put-obliqueangle
- 構文
- (vla-put-obliqueangle vla-object angle )
- 機能
- オブジェクトの傾斜角度を指定する。
- 引数
- 
- vla-object … VLAオブジェクト(Attribute、AttributeReference、Shape、Text、TextStyle)
- angle … 傾斜角度。-85~85 度までのラジアンの角度。正の角度は右への傾きを示す。負の値は 2π を加えて等価な正の角度に変換する。
 
- 戻り値
- nil
- MEMO: 傾斜角度は、直交軸に対するオブジェクトの「傾斜」角度。
- サンプル
(vl-load-com)
(defun c:Example_ObliqueAngle()
    ;; 文字を作成して、傾斜角度を変更するサンプル
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; 文字の定義
    (setq insertionPoint (vlax-3d-point 3 3 0)
          textString "Hello, World."
          height 0.5)
    
    ;; 文字を作成
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq textObj (vla-AddText modelSpace textString insertionPoint height))  
    (vla-ZoomAll acadObj)
  
    (alert (strcat "現在の傾斜角度は " (rtos (vla-get-ObliqueAngle textObj) 2)))
    
    ;; 傾斜角度を45度(.707 radians)に変更
    (vla-put-ObliqueAngle textObj 0.707)
    (vla-ZoomAll acadObj)
    (alert (strcat "新しい傾斜角度は " (rtos (vla-get-ObliqueAngle textObj) 2)))
)
関連事項
