CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

OrthoOn Property (ActiveX)

2023-1-3 09:28| 发布者: admin| 查看: 409| 评论: 0|来自: AutoCAD

摘要: 指定视区的等轴测捕捉模式的状态。

指定视区的等轴测捕捉模式的状态。

支持的平台:仅窗口

签名

工 务 局:

object.OrthoOn
对象

类型:视口

此属性适用的对象。

属性值

只读:

类型:布尔

  • True:等轴测捕捉模式已打开。
  • False:等轴测捕捉模式已关闭。

言论

没有额外的评论。

例子

工 务 局:

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")))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-19 13:20

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部