CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

文本框架显示属性 (ActiveX)

2023-1-3 04:10| 发布者: admin| 查看: 381| 评论: 0|来自: AutoCAD

摘要: 使用文本框或文本对象在多重引线文本内容周围切换框架的显示,而不是显示文本本身。

使用文本框或文本对象在多重引线文本内容周围切换框架的显示,而不是显示文本本身。

支持的平台:仅窗口

签名

工 务 局:

object.TextFrameDisplay
对象

类型:数据库首选项地理位置标记MLeader

此属性适用的对象。

属性值 - 数据库首选项

只读:

类型:布尔

  • True:显示文本范围周围的框架,但不显示文本本身。
  • False:显示全文。

属性值 - 地理位置标记,MLeader

只读:

类型:布尔

  • True:显示框架
  • False:不显示框架

言论

此属性的初始值为 False。

数据库首选项:启用或禁用此选项后,必须使用该方法更新显示。Regen

注意:对象的此属性的值存储在 QTEXTMODE 系统变量中。DatabasePreferences

例子

工 务 局:

Sub Example_TextFrameDisplay()
    ' This example returns the current setting of
    ' TextFrameDisplay. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim currTextFrameDisplay As Boolean
    
    ' Retrieve the current TextFrameDisplay value
    currTextFrameDisplay = ThisDrawing.Preferences.TextFrameDisplay
    MsgBox "The current value for TextFrameDisplay is " & Preferences.TextFrameDisplay, vbInformation, "TextFrameDisplay Example"
    
    ' Change the value for TextFrameDisplay
    ThisDrawing.Preferences.TextFrameDisplay = Not (currTextFrameDisplay)
    MsgBox "The new value for TextFrameDisplay is " & Preferences.TextFrameDisplay, vbInformation, "TextFrameDisplay Example"
    
    ' Reset TextFrameDisplay to its original value
    ThisDrawing.Preferences.TextFrameDisplay = currTextFrameDisplay
    MsgBox "The TextFrameDisplay value is reset to " & Preferences.TextFrameDisplay, vbInformation, "TextFrameDisplay Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_TextFrameDisplay()
    ;; This example returns the current setting of
    ;; TextFrameDisplay. It then changes the value, and finally
    ;; it resets the value back to the original setting.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    (setq preferences (vla-get-Preferences doc))
    
    ;; Retrieve the current TextFrameDisplay value
    (setq currTextFrameDisplay (vla-get-TextFrameDisplay preferences))
    (alert (strcat "The current value for TextFrameDisplay is " (if (= currTextFrameDisplay :vlax-true) "True" "False")))
    
    ;; Change the value for TextFrameDisplay
    (vla-put-TextFrameDisplay preferences (if (= currTextFrameDisplay :vlax-true) :vlax-false :vlax-true))
    (alert (strcat "The new value for TextFrameDisplay is " (if (= (vla-get-TextFrameDisplay preferences) :vlax-true) "True" "False")))
    
    ;; Reset TextFrameDisplay to its original value
    (vla-put-TextFrameDisplay preferences currTextFrameDisplay)
    (alert (strcat "The TextFrameDisplay value is reset to " (if (= (vla-get-TextFrameDisplay preferences) :vlax-true) "True" "False")))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-19 12:09

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部