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: 

Can't obtain MacroManager

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
WhiteSharx
783 Views, 8 Replies

Can't obtain MacroManager

WhiteSharx
Contributor
Contributor

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?

 

untitled.png

 

Or is there any other way to delete all macros from document?

0 Likes

Can't obtain MacroManager

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?

 

untitled.png

 

Or is there any other way to delete all macros from document?

8 REPLIES 8
Message 2 of 9
jeremytammik
in reply to: WhiteSharx

jeremytammik
Autodesk
Autodesk

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 

 

MacroManager API

 

 

Cheers,

 

Jeremy



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

0 Likes

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 

 

MacroManager API

 

 

Cheers,

 

Jeremy



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

Message 3 of 9
WhiteSharx
in reply to: jeremytammik

WhiteSharx
Contributor
Contributor

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!

0 Likes

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!

Message 4 of 9
Revitalizer
in reply to: WhiteSharx

Revitalizer
Advisor
Advisor
Accepted solution

Hi,

 

add "RevitAPIMacros.dll" to your VS project.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Hi,

 

add "RevitAPIMacros.dll" to your VS project.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 5 of 9
WhiteSharx
in reply to: Revitalizer

WhiteSharx
Contributor
Contributor

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)!

0 Likes

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)!

Message 6 of 9
Revitalizer
in reply to: WhiteSharx

Revitalizer
Advisor
Advisor

Hi,

 

I cannot believe that RevitAPIMacrosInterop.dll solves the problem since it does not contain the MacroManager definition.

But RevitAPIMacros.dll does:

 

Macro.png




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes

Hi,

 

I cannot believe that RevitAPIMacrosInterop.dll solves the problem since it does not contain the MacroManager definition.

But RevitAPIMacros.dll does:

 

Macro.png




Rudolf Honke
Software Developer
Mensch und Maschine





Message 7 of 9
jeremytammik
in reply to: WhiteSharx
Message 8 of 9
Revitalizer
in reply to: jeremytammik

Revitalizer
Advisor
Advisor

Hi Jeremy,

 

BuildingCoder.csproj confirms my assumption.

 

 

Bye,

Rudi




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes

Hi Jeremy,

 

BuildingCoder.csproj confirms my assumption.

 

 

Bye,

Rudi




Rudolf Honke
Software Developer
Mensch und Maschine





Message 9 of 9
jeremytammik
in reply to: Revitalizer

jeremytammik
Autodesk
Autodesk

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:

 

http://thebuildingcoder.typepad.com/blog/2016/09/macromanager-materials-kiss-and-getting-started.htm...

 

Thank you both for raising and solving this!

 

Cheers,

 

Jeremy



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

0 Likes

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:

 

http://thebuildingcoder.typepad.com/blog/2016/09/macromanager-materials-kiss-and-getting-started.htm...

 

Thank you both for raising and solving this!

 

Cheers,

 

Jeremy



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

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

Post to forums  

Autodesk Design & Make Report