Creates and opens a new document of the specified type.
Creating a document is not supported within any of the Command related events. When a command is running, a transaction is open, and creating and closing documents cannot be transacted and, as a result, cannot be contained within a command transaction.
"documents_var" is a variable referencing a Documents object. |
"documents_var" is a variable referencing a Documents object. |
"documents_var" is a variable referencing a Documents object. |
| Type | Description |
| Document | Returns the created document |
| Name | Type | Description |
| documentType | DocumentTypes | A value from the DocumentTypes enum that specifies the type of document to create. |
| visible | boolean | Optional argument specifying is the document should be visible or not. Currently, documents can only be created visibly so this argument must always be true. This is an optional argument whose default value is True. |
| options | NamedValues | Various options that are supported that are specific to the document type. See the documentation for the DocumentTypes enum for information about the options supported for the various types. This is an optional argument whose default value is null. |
| Name | Description |
| Create document as part, assembly, or hybrid intent. | Demonstrates creates a new document that is either a part, assembly, or hybrid intent. Before running: Run from Scripts and Add-Ins. This sample may open dialogs or require interactive choices; keep Fusion in the foreground. No open document is required; the script creates a new design (or additional documents) as it runs. |
| Loft Feature API Sample | Demonstrates creating a new loft feature. Before running: No open document is required; the script creates a new design (or additional documents) as it runs. |