FileNewDialog

The FileNewDialog event notifies the client when the end user executes the New or Create Drawing View command to create a new file.

Remarks

If the end-user uses the pop-up command list next to the New command to select an assembly, part, presentation, or drawing document, the Create New File dialog is bypassed and this notification is not sent in this case.

EventNames:

  • FileNewDialog_Pre

Parameters

Type

Name

Description

String

templateDirectory

The default template diretory as defined in the File tab of the Application Options dialog.

ResultParameters

result

Object used to supply the result of the operation. See below.

Result properties:

Type

Name

Description

String

TemplateFileName

The filename of the file to use as the template when creating the new file.

String

TemplateDirectoryPath

The directory of the file to use as the template when creating the new file.

String

TemplateFullFileName

The full file name of the template file, can be used to check that the fileName set is correct

Examples:

FileNewDialog_Pre:

Register-InventorEvent -EventName FileNewDialog_Pre -Action 'PreFileNewDialog'

function PreFileNewDialog($templateDirectory, $result) {
	#Write event code here
	$result.TemplateFileName = "template.ipt"
	$result.TemplateDirectoryPath = "C:\\Templates"
	$result.TemplateFullFileName #Returns the TemplateFullFileName e.g "C:\\Templates\template.ipt", cannot be set.
}