Hello everybody!
I'm stuck with getting MacroManager object. There are much more class members listed in API reference then really available.
What am I doing wrong?
Or is there any other way to delete all macros from document?
Solved! Go to Solution.
Solved by Revitalizer. Go to Solution.
I should think this can be done quite easily.
Look at What's New in the Revit 2014 API:
http://thebuildingcoder.typepad.com/blog/2013/04/whats-new-in-the-revit-2014-api.html
Search for
Cheers,
Jeremy
Dear Jeremy!
I looked through your link and its still not obvious to me what's wrong.
I really tried using different namespaces (Autodesk.Revit.DB.Macros and Autodesk.Revit.UI.Macros).
Is it possible that something changed since 2014 API? I'm using Revit 2016 and Visual Studio 2013 (.Net 4.5 framework). May be some kind of attribute could be the reason..
Would you be so kind to try it yourself? If you are succesfull at it then it's got to be mine PC problem
By the way, have you seen this topic http://forums.autodesk.com/t5/revit-api-forum/automatic-space-creation-problem/td-p/6553375 ?
Thanks in advance!
Revitalizer, thank you very much!
It's got to be that easy I knew it )
Actually, a reference to "RevitAPIMacrosInterop.dll" solved the problem at last (not to RevitAPIMacros.dll)!
Hi,
I cannot believe that RevitAPIMacrosInterop.dll solves the problem since it does not contain the MacroManager definition.
But RevitAPIMacros.dll does:
Hi guys,
Look at The Building Coder samples new CmdDeleteMacros.cs in release 2017.0.129.0:
https://github.com/jeremytammik/the_building_coder_samples
https://github.com/jeremytammik/the_building_coder_samples/releases/tag/2017.0.129.0
Cheers,
Jeremy
Hi Jeremy,
BuildingCoder.csproj confirms my assumption.
Bye,
Rudi
Dear Rudi,
Yes, absolutely.
I was forced to add RevitAPIMacros.dll and RevitAPIUIMacros.dll specifically for this command.
I published our discussion now as a blog post as well for future reference and better readability:
Thank you both for raising and solving this!
Cheers,
Jeremy
Can't find what you're looking for? Ask the community or share your knowledge.