Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
cpadmani95
667 Views, 6 Replies

Inventor TranslatorAddIn access using python

Hello,

I have inventor working properly, and now I want to access TranslatorAddIn Object which is derived from ApplicationAddIn Object. Please let me know what is the best way to do it. End function is to export as PDF from IDW file using python.

VBA is not feasible cause this is the small part on inventor cause I'm doing other PDF work after that using python.

import win32com.client
mod = win32com.client.gencache.EnsureModule('{D98A091D-3A0F-4C3E-B36E-61F62068D488}', 0, 1, 0)
app = win32com.client.gencache.EnsureDispatch('Inventor.Application')
app = mod.Application(app)
app.SilentOperation = True
app.Visible = True

if app.Ready:
print("inventor ready")
print(app.ActiveDocument)
oDocument = app.ActiveDocument
PDFAddIn = app.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
oContext = app.TransientObjects.CreateTranslationContext()
oContext.Type = 13059
oOptions = app.TransientObjects.CreateNameValueMap
oDataMedium = app.TransientObjects.CreateDataMedium

for key in dir(PDFAddIn):
print('{}'.format(key))