Share

Documents.AddWithOptions Method

Parent Object: Documents

Description

Creates a new Document of the specified type.The options are passed in as a NameValueMap object.

Syntax

Documents.AddWithOptions( DocumentType As DocumentTypeEnum, [Options] As Variant ) As Document

Parameters

Name Type Description
DocumentType DocumentTypeEnum Input that specifies the type of document to add. If the DocumentType argument is specified to be kDrawingDocumentObject, the method will honor the application option to decide whether to use an idw template or an Inventor DWG template.
Options Variant Optional input NameValueMap that specifies the options for creating the document. Valid values are:

Name = “TemplateFileName”, Value = String value specifies the name of template file.

Name = “CreateVisible”, Value = Boolean value that specifies whether to create the document in visible mode or not.

Name = “SheetFormat”, Value = String value that specifies the name of the sheet format that being used to create a new sheet. This is applicable only when the DocumentType is specified as kDrawingDocumentObject.

Name = “SheetFormatModelFileName”, Value = String value that specifies the name of model file that being used for sheet format. This is applicable only when the SheetFormat is specified.

Name = “PresentationSceneModelFileName”, Value = String value that specifies the name of model file that being used for presentation scene. This is applicable only when the document type kPresentationDocumentObject is specified. If this is provided then the Insert model dialog won’t appear.

This is an optional argument whose default value is null.

Version

Introduced in version 2026.1

Was this information helpful?