Can't load RevitAPIUI.dll

Can't load RevitAPIUI.dll

Anonymous
Not applicable
3,202 Views
8 Replies
Message 1 of 9

Can't load RevitAPIUI.dll

Anonymous
Not applicable

Hi All,

 

Sorry for the repost, but I think this is the better place to ask for this.

 

I'm starting to write code to access Revit Structure 2012 through the VB environment in Rhino/Grasshopper. When I'm trying to reference the assemblies, I can succesfully load the RevitAPI.dll, but I can't load the RevitAPIUI.dll.

 

The error is: 'Import failed for 'C:\Program Files\Autodesk\Revit Structure 2012\Program\RevitAPIUI.dll': Could not load file or assembly 'RevitAPIUI.dll' or one of its dependencies. The specified module could not be found.'

 

It seems to look for adui18res.dll.

 

Any ideas what this could be? Or where to look for any errors?

Any help would be greatly appreciated!

 

Thank you very much!

Jeroen

0 Likes
Accepted solutions (1)
3,203 Views
8 Replies
Replies (8)
Message 2 of 9

ollikat
Collaborator
Collaborator
Message 3 of 9

saikat
Autodesk
Autodesk

HI Jeroen

 

Did the links suggested by ollikat help resolve the issue? If not, do let us know.

 

thanks

Saikat



Saikat Bhattacharya
Senior Manager - Technology Consulting
0 Likes
Message 4 of 9

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Jeroen,

 

You can never load RevitAPIUI.dll yourself. Only Revit can do that. The same applies to RevitAPI.dll, actually. The Revit API only works within Revit itself.

 

Cheers



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

Message 5 of 9

Anonymous
Not applicable

Hi All,

 

Thank you for the prompt replies. Unfortunately I wasn't able to succeed with the API outside of Revit, for the obvious reason that it's not possible.

I started writing addins for Revit directly and will use an intermediate file to transfer the information.

 

Thanks for your help! It's greatly appreciated!

 

Jeroen

0 Likes
Message 6 of 9

jeremytammik
Autodesk
Autodesk

Perfect! Good luck and have fun!

 



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

0 Likes
Message 7 of 9

Anonymous
Not applicable

I've upgraded my Revit 2020 add in to Revit 2021 by referencing the new DLL's. The addin used to load into revit 2021 without any issues. Now I get an error stating:

cportelli4SLTL_1-1619282485906.png

 

I've searched the forum but haven't found a solution yet. Any thoughts?

Thanks

0 Likes
Message 8 of 9

jeremy_tammik
Alumni
Alumni

Maybe you inadvertently specified that your add-in is strongly named, and that is causing it to refuse to load non-strongly-named references. RevitAPIUI is not strongly named, so your add-in referencing it cannot be so either.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 9 of 9

Anonymous
Not applicable
Thank you Jeremy for the suggestion. You are correct. I had selected to use a strongly named key file. Once I changed this it worked out. Thanks again!
0 Likes