Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Incompatibility Problem

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
591 Views, 3 Replies

Incompatibility Problem

I have a problem using Revit 2012 API. I found a sample C# project which I want to compile in Visual Studio, when I add Revit API references to the project, Visual studio gives me a warning about incompatible version and then it gives me lots of errors which I think it might be incompatibility issue. 

when I am using .Net 3.5 It gives 100s of errors but if I change it to .Net 4 it reduces to 50. 

 

I was wondering if anybody can help me solving the issue.

 

Please find the sample project  attached or you can download it here http://thebuildingcoder.typepad.com/blog/2008/10/slab-boundary.html

3 REPLIES 3
Message 2 of 4
saikat
in reply to: Anonymous

Jeremy does provide updates to all his samples for each release of Revit and I can see the following post which includes the Samples which should work with Revit 2012 (he has updated all his samples to Revit 2013 too):

http://thebuildingcoder.typepad.com/blog/2011/04/migrating-the-building-coder-samples-to-revit-2012....

 

Also while this updated sample might be easy for you to use directly, please do review the general migration guidelines that are mentioned in various posts in his blog.

 

hope this helps

cheers

Saikat

 



Saikat Bhattacharya
Senior Manager - Technology Consulting
Message 3 of 4
Anonymous
in reply to: saikat

Fist of all thank you very much for  your help. 

I dont know much about programming but I checked the link you sent.

by comparing same class in two versions (2008 and 2012), I fixed some errors and reduced the number of errors to one. the error belongs to a class called 'CmdFilterPerformance". The new file (2012) does not have this class. 

 

Problem is with the "ElementIterator" which couldnt be find.

 

Please find a screen shot attached.

 

 

Message 4 of 4
saikat
in reply to: Anonymous

Hi Shayan

 

Good to hear that you have been able to resolve the compile errors on your own. Happy to hear this.

 

ElementIterator has been replaced in Revit 2011 API with the new and better FilteredElementCollector which should be used to filter out the elements you need. The updated code from Jeremy's blog might help you in figuring out how to use this API instead of the previous and obsolete ElementIterator.

 

Hope this helps.

cheers



Saikat Bhattacharya
Senior Manager - Technology Consulting

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community