ActivateDocument
The ActivateDocument notifies the client when a document is activated.
Remarks
The active document is the top-level document that is being displayed in the active view. This means that in the case of editing a part inside an assembly, the active document will still be the assembly.
EventNames:
ActivateDocument_Pre
ActivateDocument_Post
Examples:
ActivateDocument_Pre:
Register-InventorEvent -EventName ActivateDocument_Pre -Action 'PreActivateDocument'
function PreActivateDocument() {
#Write event code here
}
ActivateDocument_Post:
Register-InventorEvent -EventName ActivateDocument_Post -Action 'PostActivateDocument'
function PostActivateDocument() {
#Write event code here
}