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: 

Revit 2016 SDK Macro Samples Obsolete

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
1310 Views, 4 Replies

Revit 2016 SDK Macro Samples Obsolete

In reviewing the SDK documentation and various web-based AutoDesk help resources, I have yet to find a resolution to this issue. The sample Revit project (located ..\Revit 2016 SDK\Macro Samples\Revit_Macro_Samples.rvt) appears to be a Revit 2013 project. After opening and upgrading the document for use in Revit 2016, I attempted to run a macro. The macro manager (screenshot attached [macro-manager.png]) shows that there are problems with the macros. Upon editing and attempting to build, debug output indicates many critical errors (log attached [build.txt]), which appear to result from various class methods that have been deprecated somewhere between Revit 2013 & Revit 2016.

 

Is there a functional macro sample Revit project available somewhere? Am I approaching this incorrectly, somehow? The AutoDesk help makes multiple mentions of the necessity to upgrade, and sometimes manually edit the macros so that they will function. However, implementing the deprecated methods according to the 2016 API would require significant changes, time, and effort.

 

Is it better to ignore this sample document and use some other web resources for learning the foundations of Revit macro creation? Are there good resources for Python-based macro development? It appears that newly created Python macros are automagically populated with sample macros that can be successfully built. However, creation of new C# and VB.Net do NOT offer similar buildable samples.

 

I'm incredibly confused by the SDK and various documentation inconsistencies, and various web searches do not offer any solutions. Thanks in advance for any insights.

4 REPLIES 4
Message 2 of 5
jeremytammik
in reply to: Anonymous

Dear Brandan,

 

Thank you for your report and very sorry about your confusion.

 

I hope that the material for getting started with the Revit API in its non-macro incarnation is a bit clearer:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#2

 

The macro environment should be simpler to use. I am sorry to hear that the samples are broken, though.

 

I checked, and we do indeed have an existing change request number REVIT-93253 [SDK macro samples cause build errors due to obsolete API] for this issue, which will require exploration and possibly a modification to our software. Please make a note of this number for future reference. I have added a note of your request and your attachments to this item in order to make the development team aware of its importance.

 

You are welcome to request an update on the status of this issue or to provide additional information on it at any time quoting this change request number.

 

I hope this trouble getting started with the Revit macros does not put you off and that you find a good, fruitful, productive and fun way forward with no further frustrations.

 

Best regards,

 

Jeremy



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

Message 3 of 5
Anonymous
in reply to: jeremytammik

Thanks for the information, Jeremy. I was able to find some direction from your response.

Message 4 of 5
jeremytammik
in reply to: Anonymous

Dear Brandan,

 

Thank you for your understanding and glad that my explanation helped a bit.

 

Now I have some more good news for you:

 

A fully functional migrated version of the Revit Macro Samples for Revit 2017 has been created and shared with the community by Samer Najjar.

 

I published it with a full explanation on The Building Coder and GitHub:

 

http://thebuildingcoder.typepad.com/blog/2016/08/revit-macro-samples-migrated-to-revit-2017.html

 

Since the Revit project file he provided is for Revit 2017, you will not be able to open it directly in Revit 2016.

 

However, you can look at the diffs on GitHub:

 

https://github.com/jeremytammik/Revit_Macro_Samples/compare/2013.0.0.1...2017.0.0.0

 

They will show you exactly what you need to modify to get them working on Revit 2016 as well.

 

I hope this helps.

 

Best regards,

 

Jeremy



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

Message 5 of 5
Anonymous
in reply to: jeremytammik

Awesome. Thanks for getting back to this.

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

Post to forums  

Autodesk Design & Make Report