MigrateDocument

The MigrateDocument event notifies the client when a document is explicitly migrated to the data format of the current Inventor version. This happens when the user runs the Migrate command, when the Migrate method is called via the Inventor API, or when a document that needs migration is saved. _Pre fires before and _Post after the document is migrated.

EventNames:

  • MigrateDocument_Pre

  • MigrateDocument_Post

Parameters

Type

Name

Description

Document

document

Object that is being migrated

Remarks

Explicit migration can happen in the following situations:

  • User selects the Migrate command through the User Interface

  • The Document.Migrate method is called via the API on a document needing migration

  • A document needing migration is saved

Examples:

MigrateDocument_Pre:

Register-InventorEvent -EventName MigrateDocument_Pre -Action 'PreMigrateDocument'

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

MigrateDocument_Post:

Register-InventorEvent -EventName MigrateDocument_Post -Action 'PostMigrateDocument'

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