Vla-put-drawingdirection
- 構文
- (vla-get-drawingdirection vla-object acDrawingDirection)
- 機能
- マルチ テキスト段落を読む方向を指定する。
- 引数
-
- vla-object … GeoPositionMarker、MText のVLAオブジェクト
- acDrawingDirection 列挙型
- acLeftToRight
- acTopToBottom
- acRightToLeft (将来使用するために予約されている)
- acBottomToTop (将来使用するために予約されています)
- acByStyle (将来使用するために予約されています)
- 戻り値
- nil
- 注意: 英語やスペイン語の場合、横方向(左から右)に読む。日本語や中国語の場合、縦方向(上から下)に読むことがある。AutoCAD は、このプロパティ設定にしたがって文字を表示する。
- サンプル
(vl-load-com)
(defun c:Example_DrawingDirection()
;; マルチテキストを作成して、文字方向を変更するサンプル
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; MTEXT の値
(setq corner1 (vlax-3d-point 0 6 0)
width 7
text "This is a text String.")
;; MText オブジェクトを作成。
(setq modelSpace (vla-get-ModelSpace doc))
(setq MTextObj (vla-AddMText modelSpace corner1 width text))
(vla-ZoomAll acadObj)
;; 文字方向を変更
(vla-put-DrawingDirection MTextObj acLeftToRight)
(vla-ZoomAll acadObj)
(alert "文字方向を左から右へ")
(vla-put-DrawingDirection MTextObj acTopToBottom)
(vla-ZoomAll acadObj)
(alert "文字方向を上から下へ")
;; 文字方向を元に戻します
(setq retDirection (vla-get-DrawingDirection MTextObj))
(alert (strcat "文字方向 DrawingDirection を元に戻します: " (itoa retDirection)))
)
関連事項