TextFrameDisplay property example

Sub TextFrame_Example()
' This example returns the current setting of TextFrameDisplay.
    Dim bShowTextFrame As Boolean
    bShowTextFrame = ThisDrawing.preferences.TextFrameDisplay
    MsgBox "The TextFrameDisplay property is: " & bShowTextFrame
    'toggle the TextFrameDisplay
    MsgBox "Changing TextFrameDisplay to: " & Not bShowTextFrame
    ThisDrawing.preferences.TextFrameDisplay = Not bShowTextFrame
    ThisDrawing.Regen acAllViewports
    'toggle the TextFrameDisplay again
    MsgBox "Changing TextFrameDisplay to: " & bShowTextFrame
    ThisDrawing.preferences.TextFrameDisplay = bShowTextFrame
    ThisDrawing.Regen acAllViewports
End Sub

© Bricsys NV. All rights reserved.