LastHeight プロパティ(ActiveX)

最後に使用された文字高さを指定します。

サポートされているプラットフォーム: Windows のみ

構文と要素

VBA:

object.LastHeight
object

タイプ: TextStyle

このプロパティが適用されるオブジェクト。

プロパティの値

読み込み専用: いいえ

タイプ: 倍精度浮動小数点数型

文字スタイルで最後に使用された文字高さ。

注意

追加の注意はありません。

VBA:

Sub Example_LastHeight()
    ' This example finds the current value for LastHeight.
    ' It then changes that value, and resets it again.

    Dim txtStyleObj As AcadTextStyle
    Set txtStyleObj = ThisDrawing.ActiveTextStyle
    
    ' Set and retrieve the LastHeight property
    Dim currHeight As Double
    Dim newHeight As Double
    
    ' Retrieve current LastHeight property
    currHeight = txtStyleObj.lastHeight
    MsgBox "The current value for LastHeight is " & txtStyleObj.lastHeight, , "LastHeight Example"
    
    ' Set LastHeight to a new value
    txtStyleObj.lastHeight = 4#
    
    ' Retrieve the current LastHeight value
    newHeight = txtStyleObj.lastHeight
    MsgBox "The new value for LastHeight is " & txtStyleObj.lastHeight, , "LastHeight Example"
    
    ' Finally reset LastHeight to its default value
    txtStyleObj.lastHeight = currHeight
    MsgBox "The value for LastHeight has been reset to " & txtStyleObj.lastHeight, , "LastHeight Example"
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_LastHeight()
    ;; This example finds the current value for LastHeight.
    ;; It then changes that value, and resets it again.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    (setq txtStyleObj (vla-get-ActiveTextStyle doc))
    
    ;; Set and retrieve the LastHeight property
    ;; Retrieve current LastHeight property
    (setq currHeight (vla-get-LastHeight txtStyleObj))
    (alert (strcat "The current value for LastHeight is " (rtos currHeight 2)))
    
    ;; Set LastHeight to a new value
    (vla-put-LastHeight txtStyleObj 4)
    
    ;; Retrieve the current LastHeight value
    (setq newHeight (vla-get-LastHeight txtStyleObj))
    (alert (strcat "The new value for LastHeight is " (rtos newHeight 2)))
    
    ;; Finally reset LastHeight to its default value
    (vla-put-LastHeight txtStyleObj currHeight)
    (alert (strcat "The value for LastHeight has been reset to " (rtos currHeight 2)))
)