Need help fixing - export OBJ script from Revit 2020.

Need help fixing - export OBJ script from Revit 2020.

azims
Explorer Explorer
2,664 Views
11 Replies
Message 1 of 12

Need help fixing - export OBJ script from Revit 2020.

azims
Explorer
Explorer

Dear All,

 

Attached is a script written by Clive Broadhurst (inglegreen.com) to export OBJ files from Revit.  Unfortunately this script is not working with Revit 2020.  Is it possible for any of you folks to fix this script so it will work with Revit 2020?

 

Thank you, 

Azims

 

 

0 Likes
Accepted solutions (1)
2,665 Views
11 Replies
Replies (11)
Message 2 of 12

jeremytammik
Autodesk
Autodesk

I would be surprised and impressed if anyone has the time and energy to perform this work for you for free, just for the asking.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 12

jeremytammik
Autodesk
Autodesk

Furthermore, you have provided just the DLL and the add-in manifest, no source code.

 

That makes it pretty hard to migrate, since the DLL needs to be decompiled first.

 

Do you possess the legal rights to reverse engineer and decompile this code?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 4 of 12

azims
Explorer
Explorer

Hi Jeremey,

 

Thanks for posting a response on this.  First I don't know what level of effort is required to do this work as I don't have any C# programming skills.  More skilled users like you could educate me on the process of how to go about it if I want to take on this task by myself.  Alternately If any users are willing to do this work for a fee, let me know what the fee would be and I will see if I could afford your services.

 

Second, I only provided the files which Clive had on his webpage (inglegreen.com) sometime back.  Unfortunately Clive's webpage has no activity for the past few years and he has left no contact information.  If I could contact Clive with regard to this I would have done so.  I pray that he is safe and doing well.

 

I don't possess the legal rights for his code.  All I know is Clive never charged for these and allowed free access to this on his website.  If I figure how to make this work or pay anyone to do this work,  I will keep it open source and attribute all credit/ rights to Clive.

 

Now let me explain why the need for this little script.  This is the only script I have found which can seamlessly export OBJ files from Revit and during that process allows the option to also collapses the meshes down by individual materials.  It is very fast and can handle large revit files easily.  I have tried alternate paid OBJ exporters, none of them are able to do this currently.  Clive's script worked on Revit 2018 but does not work on 2020.

 

One alternate way of getting an OBJ out of Revit is to export an FBX to 3ds max and try getting an OBJ from 3ds max.  I have tried that also.  However the OBJ files coming from max collapse all the materials into a single material.  So we lose all material information.

 

As you know Autodesk Revit is a software which dominates the AEC industy.  Such a dominant platform has no way to export the geometry data to an open platform like OBJ, either by itself or via 3ds max.  This may be either due to oversight or by design, I don't know. Either way its a flaw which needs to be remedied in my opinion.

 

Best,

Azims

 

0 Likes
Message 5 of 12

jeremytammik
Autodesk
Autodesk
0 Likes
Message 6 of 12

azims
Explorer
Explorer
Hi Jeremy,

Is it possible to provide a dll file for this exporter? Or can you give me some instructions on how to convert these files into a dll. I mean how to process these through visual studio to get a dll?

I put all the source files in the 'C:\ProgramData\Autodesk\Revit\AddIns\2020' folder and I am getting a error '''Failed to initialize the add-in "OBJ Export" because the assembly "ObjExport.dll" does not exist.'''

Thank you very much,
Azims

[cid:1b5554a5-5ff4-4612-b966-7af04a07e950]


0 Likes
Message 8 of 12

azims
Explorer
Explorer
Looks my revit API journey is about to start.

Thank you,
Azims
0 Likes
Message 9 of 12

azims
Explorer
Explorer

Jeremy,

 

Is there any option for a python user to work with revit API?

 

Thanks,

Azims

0 Likes
Message 10 of 12

jeremytammik
Autodesk
Autodesk

You can implement Revit macros in Python.

 

You can also use the Revit Python Shell or Dynamo.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 11 of 12

azims
Explorer
Explorer
Thanks Jeremy.
0 Likes
Message 12 of 12

giobro
Contributor
Contributor
Accepted solution

Just for reference, Doug Klassen has created an add-in wrapper for the Revit to .obj exporter written by Clive Broadhurst. The code is saved here: https://github.com/dougklassen/Revit-Obj-Export\

 

Cheers

Giovanni

0 Likes