OrthoOn プロパティ(ActiveX)

ビューポートのアイソメ スナップ モードの状態を指定します。

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

構文と要素

VBA:

object.OrthoOn
object

タイプ: Viewport

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

プロパティの値

読み込み専用: いいえ

タイプ: ブール型

注意

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

VBA:

Sub Example_OrthoOn()
    ' This example toggles the setting of OrthoOn.

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

    ' Toggle the setting of OrthoOn
    viewportObj.OrthoOn = Not (viewportObj.OrthoOn)
    
    ' Reset the active viewport to see the change on the AutoCAD status bar
    ThisDrawing.ActiveViewport = viewportObj
    
    MsgBox "Isometric snap mode is now: " & IIf(viewportObj.OrthoOn, "On", "Off"), , "OrthoOn Example"
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_OrthoOn()
    ;; This example toggles the setting of OrthoOn.
    (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 OrthoOn
    (alert (strcat "Isometric snap mode is: " (if (= (vla-get-OrthoOn viewportObj) :vlax-true) "On" "Off")))

    ;; Toggle the setting of OrthoOn
    (vla-put-OrthoOn viewportObj (if (= (vla-get-OrthoOn viewportObj) :vlax-true) :vlax-false :vlax-true))
    
    ;; Reset the active viewport to see the change on the AutoCAD status bar
    (vla-put-ActiveViewport doc viewportObj)
    
    (alert (strcat "Isometric snap mode is now: " (if (= (vla-get-OrthoOn viewportObj) :vlax-true) "On" "Off")))
)