Document Events

The DocumentDelete event notifies the client when an entity is deleted from a document. _Pre fires before and _Post after the entity is deleted.
The event is triggered for each deleted entity. If the user selects multiple objects and presses Delete, the event fires once per entity.

EventNames:

  • DocumentDelete_Pre

  • DocumentDelete_Post

Remarks

This notification is sent for each entity that is deleted. If the user selects multiple entities and then presses the delete key a delete notification is sent for each entity that is deleted.

Examples:

DocumentDelete_Pre:

Register-InventorEvent -EventName DocumentDelete_Pre -Action 'PreDocumentDelete'

function PreDocumentDelete() {
	#Write event code here
}

DocumentDelete_Post:

Register-InventorEvent -EventName DocumentDelete_Post -Action 'PostDocumentDelete'

function PostDocumentDelete() {
	#Write event code here
}

The ChangeSelectSet event notifies the client after the contents of the select set have changed, i.e. when objects are added to or removed from the selection or when the selection is cleared. Only _Post is available.
The event can appear to fire twice when the user selects another object while an object is already selected: once because the current selection is removed and once because the new object is added.

EventNames:

  • ChangeSelectSet_Post

Examples:

ChangeSelectSet_Post:

Register-InventorEvent -EventName ChangeSelectSet_Post -Action 'PostChangeSelectSet'

function PostChangeSelectSet() {
	#Write event code here
}