Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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))
Solved! Go to Solution.