我用代码关闭布局的图纸阴影后还是会显示灰色的边框,直接在设置手动关闭就不会显示阴影,麻烦各位大佬解答一下
- (defun c:TT (/ lout display)
- (vl-load-com)
- (setq lout (vla-Item
- (vla-get-layouts
- (vla-get-activedocument
- (vlax-get-acad-object)
- )
- )
- (getvar "ctab")
- )
- )
- ; 设置打印样式表为monochrome.ctb
- (vla-Put-StyleSheet
- (vla-get-activelayout
- (vla-get-activedocument
- (vlax-get-acad-object)
- )
- )
- "monochrome.ctb"
- )
-
- (setq display (vla-get-display (vla-get-preferences (vlax-get-acad-object))))
- (if (= (vla-get-ShowPlotStyles lout) :vlax-true)
- (progn
- ; 关闭显示打印样式
- (vla-put-ShowPlotStyles lout :vlax-false)
- ; 设置线宽显示为0
- (setvar "lwdisplay" 0)
- ; 显示纸张阴影
- (vla-put-LayoutDisplayPaperShadow display 1)
- ; 不显示纸张背景
- (vla-put-LayoutDisplayPaper display 0)
- ; 设置布局背景颜色为黑色
- (vla-put-GraphicsWinLayoutBackgrndColor (vla-get-display (vla-get-preferences (vlax-get-acad-object)))
- 0
- )
- )
- (progn
- ; 开启显示打印样式
- (vla-put-ShowPlotStyles lout :vlax-true)
- (setvar "lwdisplay" 0)
- (vla-put-LayoutDisplayPaperShadow display 0)
- (vla-put-LayoutDisplayPaper display 1)
- ; 设置布局背景颜色为白色
- (vla-put-GraphicsWinLayoutBackgrndColor (vla-get-display (vla-get-preferences (vlax-get-acad-object)))
- 16777215
- )
- )
- )
- (vla-regen (vla-get-activedocument (vlax-get-acad-object)) acAllViewports)
- (princ)
- )
|