FileSaveAsDialog
The FileSaveAsDialog event notifies the client when the user executes the SaveAs or trhe SaveCopyAs command to create a new file.
Remarks
This notification is also sent when the Save command is executed the first time for a file that has not been previously saved.
By using this event and setting a fileName and directoryPath to the result variable, the user can replace the default inventor behavior, normally used to replace the Inventor dialog with their own dialog.
EventNames:
FileSaveAsDialog_Pre
Parameters
Type |
Name |
Description |
|---|---|---|
bool |
isSaveCopyAs |
Indicates if the end-user is performing a Save As or Save Copy As operation. Returns True if it is a Save Copy As and False for Save As. |
ResultParameters |
result |
Object used to supply the result of the operation. See below. |
Result properties:
Type |
Name |
Description |
|---|---|---|
String |
FileName |
The file name to use. |
String |
DirectoryPath |
The directory where the file that should be saved is in. |
String |
FullFileName |
The full file name of the file that will be used. Can be used to check that the set file name is correct. |
Examples:
FileSaveAsDialog_Pre:
Register-InventorEvent -EventName FileSaveAsDialog_Pre -Action 'PreFileSaveAsDialog'
function PreFileSaveAsDialog($isSaveCopyAs, $result) {
#Write event code here
$result.FileName = "12345.ipt"
$result.DirectoryPath = "C:\\Vault"
$result.FullFileName # C:\\Vault\12345.ipt
}