CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

QNewTemplateFile Property (ActiveX)

2023-1-3 07:45| 发布者: admin| 查看: 433| 评论: 0|来自: AutoCAD

摘要: 设置 QNEW 命令的默认模板文件名。

设置 QNEW 命令的默认模板文件名。

支持的平台:仅窗口

签名

工 务 局:

object.QNewTemplateFile
对象

类型:首选项文件

此属性适用的对象。

属性值

只读:

类型:字符串

要使用的默认图形样板的文件名。

言论

此属性的值控制与 QNEW 命令一起使用的默认模板。若要使用此属性,必须将对象声明为对象。PrefrencesFiles

例子

工 务 局:

Sub Example_QNewTemplateFile()
	' This example uses a template file named MyTemplate.dwt to
	' set a default template for the QNEW command. 
	' You should change the example to use
	' a template file on your computer.

	Dim MyTemplate As AcadPreferencesFiles
	Set MyTemplate = AcadApplication.Preferences.Files
	MyTemplate.QNewTemplateFile = "C:\MainTemplate.dwt"

End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_QNewTemplateFile()
    ;; This example uses a template file named MyTemplate.dwt to
    ;; set a default template for the QNEW command. 
    ;; You should change the example to use
    ;; a template file on your computer.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))

    (vla-put-QNewTemplateFile (vla-get-Files preferences) "C:\\MainTemplate.dwt")
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-19 14:58

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部