新方法 (ActiveX)
在 SDI 模式下创建新文档。 支持的平台:仅限 Windows 签名VBA: RetVal = object.New(TemplateFileName)
言论只有在SDI模式下工作时,才应从对象调用该方法。在 MDI 模式下工作时,使用集合上的方法创建新图形。NewDocumentAddDocuments 例子VBA: Sub Example_New()
' This example creates a new drawing based on the template ansi-a.dwt.
' Note: The path to the template file is included with its name. Adjust
' this path for your installation location before running this example.
Dim templateFileName As String
templateFileName = "c:\AutoCAD\template\ansi-a.dwt"
If AcadApplication.preferences.System.SingleDocumentMode = True Then
ThisDrawing.New templateFileName
Else
ThisDrawing.Application.Documents.Add templateFileName
End If
End Sub
可视化 LISP: Not available |
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-11-3 12:02
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.