CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

PostScriptPrologFile Property (ActiveX)

2023-1-3 08:18| 发布者: admin| 查看: 465| 评论: 0|来自: AutoCAD

摘要: 指定 acad.psf 文件中自定义 prolog 部分的名称。

指定 acad.psf 文件中自定义 prolog 部分的名称。

支持的平台:仅窗口

签名

工 务 局:

object.PostScriptPrologFile
对象

类型:首选项文件

此属性适用的对象。

属性值

只读:

类型:字符串

执行 PSOUT 时要使用的acad.psf文件的后记 prolog 部分的名称。

言论

prolog 部分与 PSOUT AutoCAD 命令一起使用,以自定义生成的输出。有关详细信息,请参见 AutoCAD 文档。

注意:此属性的值存储在 PSPROLOG 系统变量中。

例子

工 务 局:

Sub Example_PostScriptPrologFile()
    ' This example returns the current setting of
    ' PostScriptPrologFile. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim preferences As AcadPreferences
    Dim currPostScriptPrologFile As String
    Dim newPostScriptPrologFile As String
    
    Set preferences = ThisDrawing.Application.Preferences
    
    ' Retrieve the current PostScriptPrologFile value
    currPostScriptPrologFile = preferences.Files.PostScriptPrologFile
    If currPostScriptPrologFile = "" Then
        MsgBox "PostScriptPrologFile is not currently set.", vbInformation, "PostScriptPrologFile Example"
    Else
        MsgBox "The current value for PostScriptPrologFile is " & currPostScriptPrologFile, vbInformation, "PostScriptPrologFile Example"
    End If
    
    ' Change the value for PostScriptPrologFile
    newPostScriptPrologFile = "TestPostScriptPrologFile"
    preferences.Files.PostScriptPrologFile = newPostScriptPrologFile
    MsgBox "The new value for PostScriptPrologFile is " & newPostScriptPrologFile, vbInformation, "PostScriptPrologFile Example"
    
    ' Reset PostScriptPrologFile to its original value
    preferences.Files.PostScriptPrologFile = currPostScriptPrologFile
    If currPostScriptPrologFile = "" Then
        MsgBox "PostScriptPrologFile is reset to NULL.", vbInformation, "PostScriptPrologFile Example"
    Else
        MsgBox "The PostScriptPrologFile value is reset to " & currPostScriptPrologFile, vbInformation, "PostScriptPrologFile Example"
    End If
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_PostScriptPrologFile()
    ;; This example returns the current setting of
    ;; PostScriptPrologFile. It then changes the value, and finally
    ;; it resets the value back to the original setting.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; Retrieve the current PostScriptPrologFile value
    (setq currPostScriptPrologFile (vla-get-PostScriptPrologFile (vla-get-Files preferences)))
    (if (= currPostScriptPrologFile "")
        (alert "PostScriptPrologFile is not currently set.")
        (alert (strcat "The current value for PostScriptPrologFile is " currPostScriptPrologFile))
    )
    
    ;; Change the value for PostScriptPrologFile
    (setq newPostScriptPrologFile "TestPostScriptPrologFile")
    (vla-put-PostScriptPrologFile (vla-get-Files preferences) newPostScriptPrologFile)
    (alert (strcat "The new value for PostScriptPrologFile is " newPostScriptPrologFile))
    
    ;; Reset PostScriptPrologFile to its original value
    (vla-put-PostScriptPrologFile (vla-get-Files preferences) currPostScriptPrologFile)
    (if (= currPostScriptPrologFile "")
        (alert "PostScriptPrologFile is reset to NULL.")
        (alert (strcat "The PostScriptPrologFile value is reset to " currPostScriptPrologFile))
    )
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 15:13

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部