AssemblyDelete

The AssemblyDelete event notifies the client when a component occurrence or an assembly constraint is deleted from an assembly. _Pre fires before and _Post after the object is deleted.
Other object types are not reported by this event; use [DocumentDelete](<</code_reference/objects/inventor_event_mappings/document_events/documentdelete>) if notifications for other deleted objects are needed.

EventNames:

  • AssemblyDelete_Pre

  • AssemblyDelete_Post

Parameters

Type

Name

Description

Document

document

Object that indicates the document in which the change occurred.

Remarks

Assembly objects currently reported are ComponentOccurrence and AssemblyConstraint objects. The Document.OnDelete event can be used if delete notification is needed for other types of objects.

Examples:

AssemblyDelete_Pre:

Register-InventorEvent -EventName AssemblyDelete_Pre -Action 'PreAssemblyDelete'

function PreAssemblyDelete($document) {
	#Write event code here
}

AssemblyDelete_Post:

Register-InventorEvent -EventName AssemblyDelete_Post -Action 'PostAssemblyDelete'

function PostAssemblyDelete($document) {
	#Write event code here
}