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
Solved! Go to Solution.
Solved by saikat. Go to Solution.
Solved by saikat. Go to Solution.
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):
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
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.
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
Can't find what you're looking for? Ask the community or share your knowledge.