api error in visual studio

api error in visual studio

Anonymous
Not applicable
701 Views
2 Replies
Message 1 of 3

api error in visual studio

Anonymous
Not applicable

Dear all,

 

I am trying to devolop one api in visual studio, in visual studio i selected langugae #c and net version 4.5 version with reference revit ui and revit apiui.But there is error in biggining of the program please suggest me the solution.

 

I have attached error image also.

 

Thanks & Regards

Amith

0 Likes
Accepted solutions (1)
702 Views
2 Replies
Replies (2)
Message 2 of 3

rosalesduquej
Alumni
Alumni
Accepted solution

Dear Amith

 

I see a couple of things in your picture that might be the reason for the cause of the error. 

 

First the DLL's that need to be referenced for the use of the RevitAPI are RevitAPI.dll and RevitAPIUI.dll and both of them to be set to Copy Local = False. 

 

then when being use in your namespace I see a dot before Autodesk in your Picture. 

 

Try something like using Autodesk.Revit.UI; 

 

See attached picture. 

 

Also another great recommendation that I can give you in order to succed in the start of the use of Revit API development is to go through the MyFirstPlugin tutorial. 

 

http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=16849339

 

They should be updated to the latest version of Revit this week so Stay tuned. 

 

I hope it helps and please let me know how it goes. 

 

Cheers,



Jaime Rosales D.
Sr. Developer Consultant
Twitter | AEC ADN DevBlog
0 Likes
Message 3 of 3

Anonymous
Not applicable

Dear Jaime Rosales,

 

That was my mistake now its working 100% thanks for your solution.

 

Thanks & Regards

Amith

0 Likes