CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

新方法 (ActiveX)

2023-1-4 05:13| 发布者: admin| 查看: 642| 评论: 0|来自: AutoCAD

摘要: 在 SDI 模式下创建新文档。

在 SDI 模式下创建新文档。

支持的平台:仅窗口

签名

工 务 局:

RetVal = object.New(TemplateFileName)
对象

类型:文档

此方法适用的对象。

模板文件名

访问:仅输入

类型:字符串

模板文件的完整路径和文件名。

返回值(RetVal)

类型:文档

新创建的对象。Document

言论

只有在 SDI 模式下工作时,才应从对象调用该方法。在 MDI 模式下工作时,使用集合上的方法创建新绘图。NewDocumentAddDocuments

例子

工 务 局:

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

Visual LISP:

Not available

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-19 15:26

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部