Transaction Events
The TransactionUndo event notifies a client when an undo operation is being performed.
EventNames:
TransactionUndo_Pre
TransactionUndo_Post
Examples:
TransactionUndo_Pre:
Register-InventorEvent -EventName TransactionUndo_Pre -Action 'PreTransactionUndo'
function PreTransactionUndo() {
#Write event code here
}
TransactionUndo_Post:
Register-InventorEvent -EventName TransactionUndo_Post -Action 'PostTransactionUndo'
function PostTransactionUndo() {
#Write event code here
}
The TransactionRedo event notifies the client when a redo operation is being performed.
EventNames:
TransactionRedo_Pre
TransactionRedo_Post
Examples:
TransactionRedo_Pre:
Register-InventorEvent -EventName TransactionRedo_Pre -Action 'PreTransactionRedo'
function PreTransactionRedo() {
#Write event code here
}
TransactionRedo_Post:
Register-InventorEvent -EventName TransactionRedo_Post -Action 'PostTransactionRedo'
function PostTransactionRedo() {
#Write event code here
}
The TransactionCommit event notifies the client when a transaction has been committed.
EventNames:
TransactionCommit_Pre
TransactionCommit_Post
Examples:
TransactionCommit_Pre:
Register-InventorEvent -EventName TransactionCommit_Pre -Action 'PreTransactionCommit'
function PreTransactionCommit() {
#Write event code here
}
TransactionCommit_Post:
Register-InventorEvent -EventName TransactionCommit_Post -Action 'PostTransactionCommit'
function PostTransactionCommit() {
#Write event code here
}
The TransactionAbort event notifies the client when a transaction has been aborted.
Remarks:
An abort can happen in the case where a command has started a transaction and performed operations within that transaction but decides to abort the process rather than commit it.
EventNames:
TransactionAbort_Pre
TransactionAbort_Post
Examples:
TransactionAbort_Pre:
Register-InventorEvent -EventName TransactionAbort_Pre -Action 'PreTransactionAbort'
function PreTransactionAbort() {
#Write event code here
}
TransactionAbort_Post:
Register-InventorEvent -EventName TransactionAbort_Post -Action 'PostTransactionAbort'
function PostTransactionAbort() {
#Write event code here
}
The TransactionDelete event notifies the client when a transaction has been deleted from the transaction stack.
Remarks:
The transaction stack contains a list of all transactions that can be undone or redone. Transactions are deleted as the result of three things. First, the transaction stack has a fixed number of transactions it can hold, (which is defined in the registry). When the number of transactions goes over this limit, the transactions at the bottom of the stack are deleted. This means they can no longer be undone. The second reason a transaction is deleted is when a transaction is undone and then another transaction is committed. All transactions in the undone state are deleted and can’t be redone. The third reason is as a result of a document being closed. Whenever a document is closed the entire transaction stack is cleared. All transactions in the stack will be deleted.
EventNames:
TransactionDelete_Post
Examples:
TransactionDelete_Post:
Register-InventorEvent -EventName TransactionDelete_Post -Action 'PostTransactionDelete'
function PostTransactionDelete() {
#Write event code here
}