File Access Events
The fileDirty event notifies the client when a document is about to become dirty.
EventNames:
FileDirty_Pre
Parameters
Type |
Name |
Description |
|---|---|---|
String |
libraryName |
If the document is a library part, this argument provides the name of the library as defined in the active project. If it is not a library part this will be an empty string. |
Examples:
FileDirty_Pre:
Register-InventorEvent -EventName FileDirty_Pre -Action 'PreFileDirty'
function PreFileDirty($libraryName) {
#Write event code here
}
The OnFileResolution event notifies the client whenever Inventor is trying to find the location of a file on disk.
EventNames:
FileResolution_Pre
Parameters
Type |
Name |
Description |
|---|---|---|
String |
libraryName |
If the document is a library part, this argument provides the name of the library as defined in the active project. If it is not a library part this will be an empty string. |
String |
relativeFileName |
The relative filename of the document. This is typically just the filename but may also include relative path information. Inventor uses this in combination with the paths defined by the active project to resolve the location of the file. |
Examples:
FileResolution_Pre:
Register-InventorEvent -EventName FileResolution_Pre -Action 'PreFileResolution'
function PreFileResolution($libraryName, $relativeFileName) {
#Write event code here
}