TranslateDocument
The TranslateDocument event notifies the client whenever a non-Inventor file is translated into Inventor (import) or an Inventor document is translated out to a non-Inventor file (export). _Pre fires before and _Post after the translation.
EventNames:
TranslateDocument_Pre
TranslateDocument_Post
Parameters
Type |
Name |
Description |
|---|---|---|
bool |
translatingIn |
Input Boolean that specifies whether the document is being translated into Autodesk Inventor. |
String |
fullFileName |
The full filename of the document being translated. This is supplied both before and after. |
document |
The object that is created as a result of the translation. This is only available in the Post event, as in the Pre event, the document has not been created yet |
Examples:
TranslateDocument_Pre:
Register-InventorEvent -EventName TranslateDocument_Pre -Action 'PreTranslateDocument'
function PreTranslateDocument($translatingIn, $fullFileName) {
#Write event code here
}
TranslateDocument_Post:
Register-InventorEvent -EventName TranslateDocument_Post -Action 'PostTranslateDocument'
function PostTranslateDocument($translatingIn, $fullFileName, $document) {
#Write event code here
}