TextFrameDisplay 属性 (ActiveX) 
使用文本框或文本对象切换多引线文本内容周围的框架显示,而不是显示文本本身。 支持的平台:仅限 Windows 属性值 - DatabasePreferences只读:不 类型:布尔 
 属性值 - GeoPositionMarker、MLeader只读:不 类型:布尔 
 言论此属性的初始值为 False。 DatabasePreferences:启用或禁用此选项后,必须使用该方法更新显示。Regen 注意:对象的此属性值存储在 QTEXTMODE 系统变量中。DatabasePreferences 
例子VBA: 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
可视化 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")))
)
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 23:50
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.