Plug-in for AUTODESK Inventor files

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
cschmitz
Posts: 2
Joined: Mon Jul 06, 2020 1:50 pm
Location: Germany

Re: Plug-in for AUTODESK Inventor files

Post by cschmitz »

Hello Mr. Plonka,

My motivation is not creating interoperability between Inventor and FreeCAD, but creating Interoperability between Inventor 2010 and Inventor 2020 :D.
My preferred programming language is VBA, because it is shipped with Inventor as well as MS-Office, and its so easy to deal with their APIs.

I have attached a Sample iam-UFRxDoc-Disassembly.

Is there a way to exchange email-adresses for further communication? I'm still writing in this forum's language for other users convenience, but i would'nt mind switching to german.

Greetings from Aachen

CSchmitz
Attachments
SampleUFRxDoc.zip
(13.61 KiB) Downloaded 106 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Plug-in for AUTODESK Inventor files

Post by Kunda1 »

if you fellas decide to go off-forum to discuss, please consider keeping us updated on your efforts. There maybe more 'pioneers' like yourselves that are interested in this endeavor (despite the outcome being for FreeCAD or not). Thanks for your efforts and considerations.

Cheers
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
vikebo
Posts: 19
Joined: Sun Aug 21, 2016 7:50 pm

Re: Plug-in for AUTODESK Inventor files

Post by vikebo »

Installed the latest stable version of FreeCAD for Windows a few days ago.

The Addon manager complained about missing xlutils and olefile when trying to install the plugin. Installing these using python3 (already had 3.8.5 on the computer) didn't help, but I noticed the FreeCAD Python console said 3.6.6 conda-forge.

Tried installing from the FreeCAD install directory (c:/users/username/AppData/Local/FreeCAD 0.18/bin) like this:
C:\Users\username\AppData\Local\FreeCAD 0.18\bin>python.exe -m pip install xlutils
C:\Users\username\AppData\Local\FreeCAD 0.18\bin>python.exe -m pip install olefile

After this the plugin installed without problems.


OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: NorwegianBokmal/Norway (nb_NO)
valex
Posts: 1
Joined: Fri Jul 31, 2020 1:33 pm
Location: Germany

Re: Plug-in for AUTODESK Inventor files

Post by valex »

cschmitz wrote: Tue Jul 07, 2020 6:11 am My preferred programming language is VBA, because it is shipped with Inventor as well as MS-Office, and its so easy to deal with their APIs.

I have attached a Sample iam-UFRxDoc-Disassembly.
Hello CSchmitz,

I‘m also very interested in understanding the structure of Inventor assembly files.
How did you create the sample UFRxDoc file? Did you translate the M. Plonka‘s code into VBA?

Thanks and have a nice day,

Alex
jmplonka
Posts: 138
Joined: Tue Dec 20, 2016 7:47 am
Location: Vaihingen (Enz), Germany

Re: Plug-in for AUTODESK Inventor files

Post by jmplonka »

Hi,

understanding the structure of the UFRxDoc will no result in any new information about how to import IAM files.
The raw structure of the IAM file is the same as the IPT files. You can use the same reader.
First thing should be to uncomment the importer in "init.py" line 13

Code: Select all

#FreeCAD.addImportType("Autodesk INVENTOR assembly file (*.iam)", "importerIL")
Second thing: replace in "importerIL.py" line 52

Code: Select all

logError(u"Sorry, AUTODESK's Inventor assemblies not yet supported!")

Code: Select all

if (Import_IPT.read(doc, filename, readProperties)):
			return Import_IPT
Than you can start reverse engeneering the IAM files by simply importing them into FC - obviously no result will be displayed but :
  • while importing Inventor files, a folder with debug information is created.
    • .\%ASSMBLY_FILE%_iam\RSeDb.log
    • .\%ASSMBLY_FILE%_iam\_.png
    • .\%ASSMBLY_FILE%_iam\0002.sat
    • .\%ASSMBLY_FILE%_iam\0002_sat.history
    • .\%ASSMBLY_FILE%_iam\0082.sat
    • .\%ASSMBLY_FILE%_iam\0082_sat.history
    • .\%ASSMBLY_FILE%_iam\AmAppSegment.log
    • .\%ASSMBLY_FILE%_iam\AmBREPSegment.log
    • .\%ASSMBLY_FILE%_iam\AmBrowserSegment.log
    • .\%ASSMBLY_FILE%_iam\AmDcSegment.log
    • .\%ASSMBLY_FILE%_iam\AmGraphicsSegment.log
    • .\%ASSMBLY_FILE%_iam\AmRxSegment.log
    • .\%ASSMBLY_FILE%_iam\DesignViewSegment.log
    • .\%ASSMBLY_FILE%_iam\iProperties.log
    • .\NBNotebookSegment.log
  • watch the output-window for error messages. You will get the first instructions about what to do next.
    At least SAT files are now availabe - but not usefull as they don't don't contian any bodies.
  • The AmDcSegment.log contain's the features to creaete your assembly.
Until now I didn't had a closer look into the apropriate files. Only that the parts for the assembly are not stored inside the IAM file.
Toshihiko
Posts: 1
Joined: Sun Apr 18, 2021 9:28 am

Re: Plug-in for AUTODESK Inventor files

Post by Toshihiko »

OS;Windows10 64bit Japanese
FreeCAD0.19
Installation has normally ended, but the following error occurs at the time of a FreeCAD start, and it can't be used.

18:11:56 During initialization the error "'cp932' codec can't decode byte 0x9f in position 2258: illegal multibyte sequence" occurred in C:\Users\toshi\AppData\Roaming\FreeCAD\Mod\InventorLoader\InitGui.py
jmplonka
Posts: 138
Joined: Tue Dec 20, 2016 7:47 am
Location: Vaihingen (Enz), Germany

Re: Plug-in for AUTODESK Inventor files

Post by jmplonka »

Hello,
It seems that installation is fine.
Please, would you mind to share the file with me?
Thanks
superbin1996
Posts: 1
Joined: Mon Sep 13, 2021 11:35 pm

Re: Plug-in for AUTODESK Inventor files

Post by superbin1996 »

Toshihiko wrote: Sun Apr 18, 2021 9:32 am OS;Windows10 64bit Japanese
FreeCAD0.19
Installation has normally ended, but the following error occurs at the time of a FreeCAD start, and it can't be used.

18:11:56 During initialization the error "'cp932' codec can't decode byte 0x9f in position 2258: illegal multibyte sequence" occurred in C:\Users\toshi\AppData\Roaming\FreeCAD\Mod\InventorLoader\InitGui.py
https://github.com/jmplonka/InventorLoader/issues/51

I solved this problem yesterday
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Plug-in for AUTODESK Inventor files

Post by jmaustpc »

superbin1996 wrote: Mon Nov 22, 2021 11:53 pm
Your first post, welcome to FreeCAD! :)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Plug-in for AUTODESK Inventor files

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply