InitializeDocument
The InitializeDocument event notifies the client when a document is initialized. Initialization is a low-level open: only a part of the document is read to determine related files, the majority of the data is not loaded. When the event fires, the document is not open yet; calling methods or properties of the document in the action forces it to open.
Every document that is opened is initialized first, but a document can also be initialized without being opened (for example the documents referenced by an opened drawing). _Pre fires before and _Post after the document is initialized.
EventNames:
InitializeDocument_Pre
InitializeDocument_Post
Parameters
Type |
Name |
Description |
|---|---|---|
document |
Object that is being initialized. |
Examples:
InitializeDocument_Pre:
Register-InventorEvent -EventName InitializeDocument_Pre -Action 'PreInitializeDocument'
function PreInitializeDocument($document) {
#Write event code here
}
InitializeDocument_Post:
Register-InventorEvent -EventName InitializeDocument_Post -Action 'PostInitializeDocument'
function PostInitializeDocument($document) {
#Write event code here
}