NewEditObject
The NewEditObject event notifies the client when the active edit object changes. The edit object is the container that is currently edited by the user: a document, a 2D or 3D sketch, or a drawing sheet. For example, the event fires when a part is activated for in-place editing within an assembly, or when a sketch is created or edited. _Pre fires before and _Post after the edit object changes.
In contrast to [ActivateDocument](<</code_reference/objects/inventor_event_mappings/application_events/activatedocument>), the event also fires when a part is edited in the context of an assembly, because in that case the assembly remains the active document.
EventNames:
NewEditObject_Pre
NewEditObject_Post
Examples:
NewEditObject_Pre:
Register-InventorEvent -EventName NewEditObject_Pre -Action 'PreNewEditObject'
function PreNewEditObject() {
#Write event code here
}
NewEditObject_Post:
Register-InventorEvent -EventName NewEditObject_Post -Action 'PostNewEditObject'
function PostNewEditObject() {
#Write event code here
}