ModelingDelete
The ModelingDelete event notifies the client when a modeling entity is deleted. Currently features and parameters are reported. _Pre fires before and _Post after the entity is deleted.
Parameters are only reported when they are explicitly deleted, not when they are deleted because their owner is deleted. If a fillet feature is deleted, the event fires for the fillet, but not for the parameter that controls its radius.
In _Post Inventor is not in a state to handle edit operations correctly; only query operations should be performed.
EventNames:
ModelingDelete_Pre
ModelingDelete_Post
Parameters
Type |
Name |
Description |
|---|---|---|
document |
The Document object that contains the entity being deleted. |
Remarks
Currently the notification is limited to features and parameters. Notification for parameters is only sent when a parameter is explicitly deleted, not when it is deleted as a result of its owner being deleted. For example if you delete a fillet feature, the notification will be sent for the fillet feature, but not for the parameter that controls the fillet radius, even though the parameter is deleted as a result of the feature delete. The type of entities supported for this event may be expanded in the future.
Examples:
ModelingDelete_Pre:
Register-InventorEvent -EventName ModelingDelete_Pre -Action 'PreModelingDelete'
function PreModelingDelete($document) {
#Write event code here
}
ModelingDelete_Post:
Register-InventorEvent -EventName ModelingDelete_Post -Action 'PostModelingDelete'
function PostModelingDelete($document) {
#Write event code here
}