UCSIconOn プロパティ(ActiveX)

UCS アイコンを表示するかどうかを指定します。

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

構文と要素

VBA:

object.UCSIconOn
object

タイプ: PViewportViewport

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

プロパティの値

読み込み専用: いいえ

タイプ: ブール型

注意

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

VBA:

Sub Example_UCSIconOn()
    ' This example toggles the setting of UCSIconOn.

    Dim viewportObj As AcadViewport
    
    ' Set the viewportObj variable to the activeviewport
    Set viewportObj = ThisDrawing.ActiveViewport
    
    ' Display the current setting of UCSIconOn
    MsgBox "UCSIcon is: " & IIf(viewportObj.UCSIconOn, "On", "Off"), , "UCSIconOn Example"

    ' Toggle the setting of UCSIconOn
    viewportObj.UCSIconOn = Not (viewportObj.UCSIconOn)
    
    ' Reset the active viewport to see the change
    ThisDrawing.ActiveViewport = viewportObj
    
    MsgBox "UCSIcon is now: " & IIf(viewportObj.UCSIconOn, "On", "Off"), , "UCSIconOn Example"
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_UCSIconOn()
    ;; This example toggles the setting of UCSIconOn.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Set the viewportObj variable to the activeviewport
    (setq viewportObj (vla-get-ActiveViewport doc))
    
    ;; Display the current setting of UCSIconOn
    (alert (strcat "UCSIcon is: " (if (= (vla-get-UCSIconOn viewportObj) :vlax-true) "On" "Off")))

    ;; Toggle the setting of UCSIconOn
    (vla-put-UCSIconOn viewportObj (if (= (vla-get-UCSIconOn viewportObj) :vlax-true) :vlax-false :vlax-true))
    
    ;; Reset the active viewport to see the change
    (vla-put-ActiveViewport doc viewportObj)
    
    (alert (strcat "UCSIcon is now: " (if (= (vla-get-UCSIconOn viewportObj) :vlax-true) "On" "Off")))
)