QNewTemplateFile Property (ActiveX)

Sets the default template file name for the QNEW command.

Supported platforms: Windows only

Signature

VBA:

object.QNewTemplateFile
object

Type: PreferencesFiles

The object this property applies to.

Property Value

Read-only: No

Type: String

File name of the default drawing template to use.

Remarks

The value of this property controls the default template used with the QNEW command. To use this property, you must declare an object as an PrefrencesFiles object.

Examples

VBA:

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")
)